Click to See Complete Forum and Search --> : Print Image
davehoonter
Apr 26th, 2006, 01:15 AM
Hi there,
what i need to do is print an image from a PictureBox when a button is clicked.
PictureBox is called: pictureBoxFinal
Image needed to print i guess will be: pictureBoxFinal.Image
Button is called: buttonPrint
can anyone give me the code required to do this.
many thanks!
dave
jmcilhinney
Apr 26th, 2006, 01:39 AM
I suggest that you download the 2003 101 samples (see my signature for a link) and check out the printing example. It deals with printing text but the principles are exactly the same regardless of what you're printing. In the PrintPage event handler you simply need to substitute DrawImage for DrawString.
davehoonter
Apr 26th, 2006, 01:41 AM
Cheers mate, i'll take a peek!
davehoonter
Apr 26th, 2006, 07:03 PM
Still having trouble with this code, if anyone can help please let me know.
Dave
jmcilhinney
Apr 26th, 2006, 07:29 PM
Add a PrintDocument to your form. Double-click it to create a handler for its PrintPage event. That's where the actual printing occurs. When you want to print call the Print method of the PrintDocument.
davehoonter
Apr 26th, 2006, 07:34 PM
Have nothing at the moment mate cos i'm stumped.
I'm a beginner in every sense of the word so need real help. You want to take a look at my actual work?
Thanks!
Dave
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.