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

Print from Printer Object to Picturebox

Status
Not open for further replies.

three57m

Programmer
Jun 13, 2006
202
US
Is it possible to print the contents of the printer object to a picturebox?
[bigears]
 
Still trying to solve your RTB preview problem? Or is this something new?
 
Yes, the EM_FORMATRANGE method almost does the job but it calculates certain fonts incorrectly causing characters to be truncated on the right.
 
>certain fonts incorrectly causing characters to be truncated on the right

I've been using EM_FORMATRANGE for years under a variety of situations (WYSIWYG printing, measuring the length of mixed font strings, etc) and never encountered this. And VB's RTB itself uses EM_FORMATRANGE to print to the printer object - .SelPrint is just a wrapper for it, so I'd expect the output to the printer device to be clipped as well if EM_FORMATRANGE is to blame.

Could you provide an example of a font for which this occurs, and I can then see and perhaps understand the clipping you are referring to?
 
I should have posted this to the previous thread so I am going to post my response to you in that thread.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top