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

Font used for labels when using PrintForm

Status
Not open for further replies.

Sashanan

Programmer
Jan 19, 2001
235
NL
At user request, most of the forms in my VB6 application have a "print screen" command button that simply executes:

Code:
Me.PrintForm

to print the form's contents. Works well except for one little problem: somehow the font for labels is larger than on screen, often causing label captions to be cut off halfway on the print. This problem doesn't occur on command button captions, textbox texts or anywhere else except label captions. Is there anything I can do about this?


"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)
 
One quick thought would be to step through all the labels on the form and change their fontsize before Me.Printform, then change them back to their original size after printing is done.

Good luck...
Wayne
 
One question, why are you saying Me.PrintForm? I thought all you needed was to put in PrintForm and it will prin the form. Just a thought.
 
MaceGoth
Printform without the qualifier will print the form that currently has focus, not necessarily the form whose code is running

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
sashanan, are you sure this isn't the same problem as reported in thread222-544273 ?

Experience is something you don't get until just after you need it.
 
waytech2003: good thought, but unfortunately all my labels are at the default, MS Sans Serif, font size 8, and it doesn't get any smaller than that.

bigalbigal: certainly an interesting read and if the problem comes up again I'll give the AutoSize thing a try. However, for some reason it doesn't happen anymore, seemingly overnight; or at least not on the printer I use. Might be a printer issue of some kind, and at any rate the customer doesn't consider it important enough for me to spend my time on. Still nags me though. :)

Thanks for your time, you both!


"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top