473,725 Members | 2,254 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PrintPageEventA rgs.HasMorePage s will not print 2nd page

I have a problem where after setting the HasMorePages =
True will not print the 2nd Pages.
Does anybody have an idea or knows this problem.

Thanks for any advice
Nov 20 '05 #1
3 8356
Hello,
"DGeorge" <do*****@hotmai l.com> schrieb:
I have a problem where after setting the HasMorePages =
True will not print the 2nd Pages.
Does anybody have an idea or knows this problem.


Which version of .NET and Windows do you use? Can you give us more
information about the printer used? Will this even occur when "printing" to
the PrintPreview control?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2
-----Original Message-----
Hello,
"DGeorge" <do*****@hotmai l.com> schrieb:
I have a problem where after setting the HasMorePages =
True will not print the 2nd Pages.
Does anybody have an idea or knows this problem.
Which version of .NET and Windows do you use? Can you

give us moreinformation about the printer used? Will this even occur when "printing" tothe PrintPreview control?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
.


Hi
I working on WXP with .net ver 1.1

The code looks like this :

Private Sub vdoc_PrintPage( ByVal sender As Object, ByVal e
As System.Drawing. Printing.PrintP ageEventArgs)

e.Graphics.Draw String("This is the
firstpage",font ,brushes,xpos,y pos)

e.HasMorePages = True

e.Graphics.Draw String("This is the Second
page",font,brus hes,xpos,ypos)

e.HasMorePages = False
......

thanks and hoping this give a clue
Nov 20 '05 #3
Hello,

"DGeorge" <do*****@hotmai l.de> schrieb:
Private Sub vdoc_PrintPage( ByVal sender As Object, ByVal e
As System.Drawing. Printing.PrintP ageEventArgs)

e.Graphics.Dra wString("This is the
firstpage",fon t,brushes,xpos, ypos)

e.HasMorePag es = True

e.Graphics.Dra wString("This is the Second
page",font,bru shes,xpos,ypos)

e.HasMorePag es = False


Have a look at this sample for the correct usage of 'e.HasMorePages '.
'HasMorePages' will cause the 'PrintPage' handler to be called an other time
for the text page.

http://www.mvps.org/dotnet/dotnet/samples/printing/
-> "PrintFramework "

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #4

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

Similar topics

8
2894
by: Mr. B | last post by:
VB.net (standard) I'm experiencing some difficulties in printing multiple pages using Print Preview. The following is my main parts of my printing subs (excess info deleted for your viewing pleasure). For a single page, the print preview (and an actual print) are OK. Getting the .HasMorePages doesn't seem to be working for me here (unless I'm missing something).
4
10224
by: Jen | last post by:
I am trying to print barcode labels directly to a Sato label printer. The problem that I am having is that the MarginBound properties are set to one inch margins. I cannot seem to figure out when and where these properties are being set. I am using the following code, pDlgBarcode is a PrintDialog control. I have a PrintDocument attached to the PrintDialog control. It prints one inch from the left edge. My little labels are only 2" wide....
1
4920
by: Fred Nelson | last post by:
I'm a newby and I'm writing my first VB.NET print program! I need to change the default left and right margins for my printed output "e" is my "System.Drawing.Printing.PrintPageEventArgs By Default: e.PageSettings.Margins.Left = 100 and e.PageSettings.Margins.Right=750 I have written code to set the values however
2
1445
by: Lars Netzel | last post by:
I have figured out everything I need to print what I need to print except to handle the HasMorePages property.. I'm looping thru a DataTable and sometimes the number of rows exceeds the lines on the printingpage I have (depending on the fontsize and family and all that) When I come to the end of the PrintPage event.. .I know I have more rows in the table that what I can fit on one page and I set the HasMorePages to true.. then the...
1
1211
by: Rave_T | last post by:
Hi all! I want to loop through my datareader and print out 5 rowns on each page but i cant get it to work... Heres my code: Dim curr_X=20 Static intItem As Integer = 0 Dim y As Integer = 0 Dim bDraw As Boolean = True Dim g As Graphics = e.Graphics
2
7906
by: Leo | last post by:
I set HasMorePages to true, but it doesn't let me jump to next page. (Of course, if I remove the HasMorePages = false in my if statement, it will create hundreds of pages). Any suggestion? Thanks in advance. Leo My code to call the print event: .... {
6
4606
by: moti | last post by:
Whenever I use PrintDocument.Print() to print a page it goes to PrintDocument_PrintPage and stays there forever unless I set e.HasMorePages to False. When I set it to False it prints the page but is closes the print file. The effect is that it prints all my pages but creates a print job for each page. So if I print 100 pages I get 100 print jobs. The only way I went around this was to put all my page-filling code within...
0
8889
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
8752
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
9257
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...
0
9116
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...
0
8099
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
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
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3228
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.