Taking Snapshot of any form of project at run time...
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
-
:confused:Hi guys, I want to take snapshot of form at runtime without manually pressing the 'Prt Scr' key is it possible if yes can any one guide me how. i want to stored the snap shot of the form in my database. Please help me thanks in advance. Sasmi
You have to create a Bitmap with form's size. Then, create a new Graphics from the Bitmap, and then call the "CopyFromScreen" method of the Graphics object. Here you have c# sample code... You only have to translate to vs basic. Bitmap oCaptura = new Bitmap(this.Width, this.Height); Graphics oGfx = Graphics.FromImage((Image)oCaptura); oGfx.CopyFromScreen(...)