View Single Post
Micro
Retired staff (11-12-2008)

Join Date: Jul 2006
Posts: 1,301
Credits: 7,429
Micro is on a distinguished road
Location: Hampshire

 
09-23-2008, 02:45 PM
Re: Visual Basic Help!

Quote:
Originally Posted by Dan View Post
That doesn't work either I'm afraid...
I hope I can get something that works soon.
Try this:

Put this at the top of the class file (form file, whatever)

Code:
Imports System.Drawing
Imports System.Drawing.Imaging
And this where you want to save it
Code:
Dim img as Bitmap = new Bitmap( Me.Width, Me.Height )
Dim g as Graphics = Graphics.FromImage( img )
 g.CopyFromScreen( new Point( Me.Left, Me.Top ), new Point( 0, 0 ), new Size( Me.Width, Me.Height ) )
img.Save( "filename.jpg", ImageFormat.Jpeg )
__________________
Micro
Account Manager

Do NOT PM me without my prior permission. Thanks.
Micro is offlineReport Post