473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

PrintPageEventArgs.HasMorePages 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 8330
Hello,
"DGeorge" <do*****@hotmail.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*****@hotmail.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.PrintPageEventArgs)

e.Graphics.DrawString("This is the
firstpage",font,brushes,xpos,ypos)

e.HasMorePages = True

e.Graphics.DrawString("This is the Second
page",font,brushes,xpos,ypos)

e.HasMorePages = False
......

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

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

e.Graphics.DrawString("This is the
firstpage",font,brushes,xpos,ypos)

e.HasMorePages = True

e.Graphics.DrawString("This is the Second
page",font,brushes,xpos,ypos)

e.HasMorePages = 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
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...
4
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...
1
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...
2
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...
1
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...
2
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...
6
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...

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.