Hi,
How is it possible to capture the screen (like PrintScreen does) and save
it as a bitmap/jpeg image?
Gaurav - http://www.gauravcreations.com - 27 Aug 2004 08:37 GMT
This will save the screenshot upon pressing of a command button
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan
As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Public Function ScreenShot(ByVal path$) As Boolean
Call keybd_event(vbKeySnapshot, 1, 0, 0) ' change to 1 for active window or
2 for whole screen
DoEvents
SavePicture Clipboard.GetData(vbCFBitmap), path$
ScreenShot = True
Exit Function
ScreenShot = False
End Function
Private Sub Command1_Click()
ScreenShot "c:\windows\screen.bmp" ' type some path here
End Sub
> Hi,
> How is it possible to capture the screen (like PrintScreen does) and save
> it as a bitmap/jpeg image?
alpine - 27 Aug 2004 08:44 GMT
>Hi,
>How is it possible to capture the screen (like PrintScreen does) and save
>it as a bitmap/jpeg image?
Have you tried doing a Google search for "screen capture vb -.net" ?
http://groups.google.com/advanced_group_search
The 10th thread in the returned list looks promising.
HTH,
Bryan
____________________________________________________________
New Vision Software "When the going gets weird,"
Bryan Stafford "the weird turn pro."
alpine_don'tsendspam@mvps.org Hunter S. Thompson -
Microsoft MVP-Visual Basic Fear and Loathing in LasVegas