473,840 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB 2005 - Print FromPage ToPage?

There have been similar questions raised in the past, however no answers
seem to have been provided, so I thought I'd give it a go.

Scenario 1:
My Windows Forms app generates (say) 10 pages in a Print Preview
Control. These pages are made up of varying sized graphics and text,
therefore each page is unique but does rely on the content of the
previous page to determine the final page layout.

My User wants to print ALL pages, pages 1 & 2 or pages 1 to 4. This
isn't a problem as we all know to exit on the last page we just set
"e.HasMorePages " to False.

Now, my User wants to only print pages 4 to 7, but how can this happen?
As I wrote, each page is reliant on the previous page to know what
images or text will run-over to the next.

Scenario 2:
My Windows Forms app opens a file that is dynamically changing every few
seconds because new information is being added by several other Users.
A report is generated with (say again) 10 pages in a Print Preview
Control. My User decides he would like to print pages 6 to 9. Once
again, how can this happen (without initially taking a snap-shot of the
data) as the .Print Method which generated the original data for the
Print Preview Control will re-generate the data when the
PrintDocument.P rint Method is called, thus losing the original
information that was being displayed to the User.

What I guess I'm asking is - How can I print selected pages from an
"existing" Print Preview without having to re-generate the pages and
having to write complex algorithms to determine when to start sending
output to the printer?

Maybe the answer is simple and I'm just missing something here!?!?

In earlier versions of VB I have used 3rd party controls which allowed
you to build your Preview pages and then send whichever pages you wanted
to the Printer without having to re-generate each page. Can we do the
same under VB 2005? What happens if my User wants to print pages 2 to 5
and 7 to 9 from the same document? How are others handling these
situations?

I look forward to reading your replies.

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
May 14 '06 #1
0 1645

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2144
by: sathyashrayan | last post by:
Following are the selected thread from the date:30-jan-2005 to 31-jan-2005. I did not use any name because of the subject is important. You can get the original thread by typing the subject "string" in google comp.lang.c archives.Hope this helps.Hope I am not bothering any one. am I? =================================Start=========================== subject: Return to Start of Line? Question: I'd like printf, the next printf, to return...
2
2772
by: Pkant | last post by:
I want to Print a txt file with this code : class Printing { PrintDocument prndoc = new PrintDocument(); PrintPreviewDialog ppd = new PrintPreviewDialog();
1
2526
by: Rainbow | last post by:
Hi, I tried to change the print setting by PrintDialog dlg = new PrintDialog(); dlg.AllowSomePages = true; dlg.AllowSelection = true; dlg.Document = pd; dlg.PrinterSettings.MinimumPage = 1; dlg.PrinterSettings.MaximumPage = 1;
0
1589
by: trint | last post by:
Since we have a laserjet 4350tn with 4 paper trays, the .dll from hp of course adds to to funtionality (like being able to select a paper tray under one of the tabs) to the "Print" dialog. I want to know how to get manipulate that within my c# app. Manual selection is: "Print" select -> Paper/Quality (tab) then select -> Source Is: (ComboListBox) How can I do this in the following code? if(m_numberOfPages < 1)
9
12978
by: trint | last post by:
Instead of just sending one document at a time, I need to send multiple documents as a print job because our laserprinter will only stack and staple one printjob it receives at a time. I need to use some of this code: PrinterSettings printerSettings = new PrinterSettings(); printerSettings.MaximumPage = m_numberOfPages; printerSettings.MinimumPage = 1; printerSettings.PrintRange = PrintRange.SomePages; printerSettings.FromPage = 1;...
1
3327
by: E. W via DotNetMonster.com | last post by:
Hi all, is it possible to configure a printpreview control so that I am able to print selected pages (for example 12-20 like by Word)? Thanks ew -- Message posted via DotNetMonster.com http://www.dotnetmonster.com/Uwe/Forums.aspx/dotnet-csharp/200509/1
6
4095
by: Siv | last post by:
Hi, I am getting into printing with VB.NET 2005 and want to implement the usual capability that a user can select a selection of pages. I have a report that is generated by my application that if the user wants all pages will produce 3 pages. I want to offer the user the ability to select via the print dialog that only pages 1 and 2 of it are printed or possibly pages 1 and 3 but not 2. At the moment I can produce all three pages...
0
9856
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9698
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10916
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10598
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10657
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10299
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7836
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5684
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.