Printing problems
-
I encounter problems when I try to print a text or a bitmap at the bottom of a page. My text or my bitmap are not printed entirely. How can I tell to VB to print my text or my bitmap in the next page ? Thks in advance. Appstmd
Appstmd wrote: How can I tell to VB to print my text or my bitmap in the next page ? VB will do this automatically for text you print using the Printer.Print method, but it is best to do it yourself. For text:
If Printer.CurrentY + Printer.TextHeight(text_to_print) > Printer.ScaleHeight Then
Printer.NewPage
End If
Printer.Print text_to_printAnd for bitmaps:
Dim picBitmap as Picture
Set picBitmap = LoadPicture(filename_of_bitmap)
If Printer.CurrentY + (picBitmap.Height * Printer.TwipsPerPixelY) > Printer.ScaleHeight Then
Printer.NewPage
End If
Printer.PaintPicture ......If you have the bitmap in a picturebox, just replace "picBitmap" in the above code with "Picture1.Picture" -- David Wengier Sonork ID: 100.14177 - Ch00k