Click to See Complete Forum and Search --> : Printing a Picture
On a form I have a picture box. Within this box i am drawing a line diagram using the line method and x and y cordinates. Its is a very complex diagram and using the x and y cordinates i allow the user the ability to select and change the size of the shapes within the drawing. The problem comes when i want to print. I cannot seem to find a way of printing the diagram as i will have to (i think) redraw it when i print. I am using VB6 and a jet 4.5 db.
If anyone knows a solution to this i will be most greatful.
Rich
Arie
Feb 8th, 2000, 03:07 AM
If you did the lines with LINE function so
you can write:
Form1.PrintForm
I think.
thank you,
Arie. :)
joey o.
Feb 8th, 2000, 04:19 AM
I don't have my programming with me but if you can't make something like form1.picture1.printform work then you could probably save the picture as .bmp then load it to another form and print:
Form2_load()
Form2.picture = Form1.picture1
Form2.printform
Form1.show
unload.me
End Sub
Don't know if this helps,let me know.
Thanks for your help. You pointed me in the right direction, I found that if the AutoReDraw property is set to true I could use the picture boxes image property to assign to a forms picture property. The next problem is how to save this as a picture file like a BMP, GIF etc ?????
Thanks
Rich
joey o.
Feb 9th, 2000, 12:05 AM
'Use this:
SavePicture Picture1.Image, "C:\PicFile.bmp"'
If you want to get into this more,use the Common dialog box.I'm short on time,but if you want more help,I'll send you some CommonDialog code later.Just ask.
Joey O.
*Super Sniper*
Feb 11th, 2000, 03:33 PM
You could also load it into a form that is plain white at the start. If you do this then you can just use form1.printform. It may be easiest just to draw & edit it on the form. Hope this helps! :)
------------------
Website (http://www.kaynor.net)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.