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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PrintForm cuts off page 2

Status
Not open for further replies.

Technocratic

Programmer
Jun 2, 2000
16
US
I searched the existing threads on this subject and nothing works. Also researched extensively with the help of Google..

running VB6 with SP5...

this should be so simple, but it acts odd... I have a form that I populate with data (on labels), then call Form.Printform, then loop through some more data, and print it again as long as needed..

I built in a pause to make sure the printer could keep up, I do NOT display the form at any time, and the wierdest part.. the first instance prints perfectly, any after that cut off the bottom of the page...

tracing through the code, I see that as soon as the PrintForm method is called, the Height property of my form is changed to 11000... which accounts for the cutting off thereafter.. but why is it doing that? I cannot seem to reset the height back to 15500, it ignores any attempts to do so...

I appreciate any advice!
 
Probably that is the max size for your display. Even if you are not showing the form, I think it's size is limited to what will actually show on the screen. Don't know why it would work once and then not afterwards. You might get away with unloading the form, and reloading it again for each printout but that would be a pain.

One other way around this may be to have your form set as a MDIChild. This way it can be larger than the display size.

Robert
 
Making the form an MDIChild did it! They each print the entire page now.

Thanks!
 
Such old stuff.... but damn it's good stuff

Solved my prob too, thanks and I'm sure you deserve another star

*****************************************
May the Code Be With You...[lightsaber]
----------
x50-8 (X Fifty Eigt)
 
Solved my problem too!! [2thumbsup]
Just remember to also set form BorderStyle to fixed or none.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top