Printing problems in VB
-
Hi all, I'm trying to print out text and graphics on the same page using VB's Printer.Print For i = 0 To List2.ListCount - 1 Step 1 Printer.Print List2.List(i) Next i If Clipboard.GetFormat(vbCFBitmap) Then Printer.PaintPicture Clipboard.GetData(), 0, 0 Printer.EndDoc End If The graphics gets printed out, but the text from the list box doesn't. Any ideas on how I can resolve this? Thanks MyFathersSon
-
Hi all, I'm trying to print out text and graphics on the same page using VB's Printer.Print For i = 0 To List2.ListCount - 1 Step 1 Printer.Print List2.List(i) Next i If Clipboard.GetFormat(vbCFBitmap) Then Printer.PaintPicture Clipboard.GetData(), 0, 0 Printer.EndDoc End If The graphics gets printed out, but the text from the list box doesn't. Any ideas on how I can resolve this? Thanks MyFathersSon
Looks like the graphic might be overlaying the print buffer. I would try the simplest approach first, and put an EndDoc after the listbox loop and see if that will flush the buffer without advancing the page. Failing that, you might have to set the text and graphics onto a Form or Picture box first, and then call PrintForm.
-
Looks like the graphic might be overlaying the print buffer. I would try the simplest approach first, and put an EndDoc after the listbox loop and see if that will flush the buffer without advancing the page. Failing that, you might have to set the text and graphics onto a Form or Picture box first, and then call PrintForm.
Thanks for your suggestion. I placed a Printing.EndDoc statement as follows: For i = 0 To List2.ListCount - 1 Step 1 Printer.Print List2.List(i) Next i Printer.EndDoc ' added and this printed both text and graphic, but on separate pages. I'm not sure how to carry out your second suggestion. MyFathersSon
-
Thanks for your suggestion. I placed a Printing.EndDoc statement as follows: For i = 0 To List2.ListCount - 1 Step 1 Printer.Print List2.List(i) Next i Printer.EndDoc ' added and this printed both text and graphic, but on separate pages. I'm not sure how to carry out your second suggestion. MyFathersSon
That's what I was afraid of... Been a long time since I messed with that. I wish I had a good example for you, but there should be a bunch of em out there (good ol' Google).
-
Thanks for your suggestion. I placed a Printing.EndDoc statement as follows: For i = 0 To List2.ListCount - 1 Step 1 Printer.Print List2.List(i) Next i Printer.EndDoc ' added and this printed both text and graphic, but on separate pages. I'm not sure how to carry out your second suggestion. MyFathersSon
Did you try printing the graphics first? Chandra
-
Did you try printing the graphics first? Chandra
I did but the results are the same. Thanks for your advice.
-
That's what I was afraid of... Been a long time since I messed with that. I wish I had a good example for you, but there should be a bunch of em out there (good ol' Google).
Thanks for your advice OldWarhorse. Not much on google.