Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IS THERE A WAY TO DETERMINE THE CURRENT PRINTHEAD POSITION?

Status
Not open for further replies.

MarcMellor

Programmer
Jan 12, 2002
34
0
0
US
I am using a PictureBox to contain some science questions that will be downloaded from a database. This allows to me to mix all sorts of text, tables and diagrams. I want to be able to print off all these in order with question numbers next to them. I can do this by placing 2 questions per page at preset positions using CurrentX and CurrentY. Unfortunately most of the questions only occupy about 1/3 of the PictureBox so there is a lot of blank space everywhere. Is it possible to start printing a new box just below where the printing stops for the previous contents? I am of course assuming that the print head does not continue to the end of a mainly empty box.
Also is there anyway of invoking Printer.NewPage if everything that is to be printed from a PictureBox will not fit on the rest of the page? Cleary without being able to do both of these it won't work and I will just have to waste paper!
 
A but short on details for me (at least at the current hour). Printer position may be set or read with Printer.Current [X | Y]. so that part is easy. Since (AFAIK) the printer doesn't 'do' the picture box thing, it's print position is simply where ever it is on the page. Further, you can get the printer.width(someobject) and printer.height(someobject) without actually printing it, and use hte simple construct of .currenty + .height(someobject) to determine wheather to issue the .newpage or not, as the instance nay dictate.

Certainly not the answer you are looking for -but perhaps some glints of light through the mire.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top