Groups | Blog | Home
all groups > vb.net > january 2005 >

vb.net : capturing the screen


Crouchie1998
1/26/2005 9:27:02 PM
These example capture the screen or the focused window:

http://www.planet-source-code.com/vb/scripts/ShowZip.asp?lngWId=10&lngCodeId=309&strZipAccessCode=tp%2FC3094716

http://www.planet-source-code.com/vb/scripts/ShowZip.asp?lngWId=10&lngCodeId=1916&strZipAccessCode=tp%2FS19169122

[quoted text, click to view]
rs
1/26/2005 10:54:17 PM
Hi guys,

How can I capture a window or the whole screen and save it as a picture?

Thanks

Ahmed

Crouchie1998
1/27/2005 9:07:03 AM
Mr MVP,

I downloaded that sample you listed & it doesn't save the image at all. It
captures the screen on program startup too, which means there is no need for
the button. If you press the button a few times then the captured (tiled)
images turn pinkish.

[quoted text, click to view]
Herfried K. Wagner [MVP]
1/27/2005 9:32:03 AM
"rs" <aa@d.com> schrieb:
[quoted text, click to view]

Screenshot
<URL:http://dotnet.mvps.org/dotnet/samples/windowsandforms/Screenshot.zip>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
Herfried K. Wagner [MVP]
1/27/2005 6:16:12 PM
"Crouchie1998" <Crouchie1998@discussions.microsoft.com> schrieb:
[quoted text, click to view]

On my system nothing gets "pinkish". You can change the window to be
captured by assigning a window handle to the 'ScreenshotGenerator''s
'Window' property. The 'Bitmap' object returned by the 'Capture' method
provides a 'Save' method that can be used to make the screenshot persistent.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
AddThis Social Bookmark Button