Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Forcing a new page in vb.net

Posted on 2004-03-29
2
Medium Priority
?
684 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 750 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

719 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