Link to home
Start Free TrialLog in
Avatar of jayhutch6279
jayhutch6279

asked on

Printing a Picturebox and a Richtextbox on the same page in VB6

In VB6, I am trying to print a picture box in the upper left corner of a page. Then I want to print the contents of a Richtext box on the same page. If I use printer.paintpicture for the picture box and rtb.selprint (printer.hdc) to print the contents of the RTB, I get error 482.  I can not use printer.print for the RTB because it will loose it's formatting. I have also tried pasting the image into a second RTB and then printing both, but they print on separate pages. Basically, I want to lay the RTB on top of the image, or the image on top of the RTB. Either way, the text has to be able to print next to the picture.

ASKER CERTIFIED SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Note that you are more interested in the PrintRTF function at that page rather than the WYSIWYG appearance on the form.
If you're already using the PrintRTF function from above, thats a good place to add any additional print routines.  Or, you could try pasting or embedding the picture into the RTF document itself and just printing it.
Avatar of jayhutch6279
jayhutch6279

ASKER

Thanks for the help. The PrintRTF was a good place to start for what I needed.
Glad to hear it.  :)