-
I have created a picturebox with Rich Text Boxes strategically placed within it. I can print the bmp of the picture but the controls do not print using:
Printer.PaintPicture Picture2.Image....
I have fiddled with autoredraw but can't seem to solve it. Any clues please?
-
I have an idea, but it is ugly. I'll wait to see if anybody has an easy solution to this. email me if you don't get an answer: [email protected]
-
How ugly's UGLY
:eek:
ping
-
OK... add another form to your project, set the borderstyle to 0-none, and add a RTB to it.
then in your main form behind a button add:
[code]
Private Sub Command1_Click()
PrintPicBox Picture1.Picture, Picture1.Height, Picture1.Width, rtb.Left, rtb.Width, rtb.Top, rtb.Height
End Sub
Public Sub PrintPicBox(pic As Object, H As Long, W As Long, rtbLeft As Long, rtbWidth As Long, _
rtbTop As Long, rtbHeight As Long)
Form2.Width = W
Form2.Height = H
Form2.Picture = pic
Form2.rtb.Move rtbLeft, rtbTop, rtbWidth, rtbHeight
Form2.PrintForm
Printer.EndDoc
Unload Form2
End Sub
[code]
I didn't have time to set this up for multiple RTB's but i'm sure you can use some arrays or udt's. sorry this is so short, but i gotta go to work about 10 min's ago. there has to be an easier way to do this , but i hope this helps for now. good luck
-
I just got home.....
Thanks for the code, I'll keep you in touch.
Thanks very much,
Ping
:D
-
I fail to see how moving the RichTextBox to the exact same position it was already in helps? I also fail to see why use a RTB when you assign the picture to the Form?