Solved

Forcing a new page in vb.net

Posted on 2004-03-29
2
679 Views
Last Modified: 2008-02-01
I am creating ID cards in vb.net. The cards will be printed on both sides, and I will be printing a variable number of lines on the front of the card. How do I go about forcing a new page (or a formfeed) to begin printing on page 2?? I have tried to use vbFormFeed in a e.graphics.DrawString, but it merely draws a square on the page where I want the formfeed to occur.

Any help would be greatly appreicated.
0
Comment
Question by:rcg112355
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
farsight earned 250 total points
ID: 10710878
How are you currently printing pages?

Are you using something like this?

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object,
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles
PrintDocument1.PrintPage

If so, this might help.
http://www.dotnet247.com/247reference/msgs/35/178404.aspx

The important thing is PrintPage should only print a single page.  Set e.HasMorePages to True if there are more pages to be printed.  PrintPage will be called again to print the next page.  Your code will have to keep track of which page you're on, and print the appropriate page.  Set e.HasMorePages to False if the document is completely done.

If you're using some completely different method to print pages, please tell us.
0
 

Author Comment

by:rcg112355
ID: 10754541
That method does work, but I just can't believe there isn't a way to send control codes directly to the printer in vb.net. This method did get the job done. I guess that this old dog has to learn some new tricks.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question