Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / August 2004



Tip: Looking for answers? Try searching our database.

Capture the screen (like Printscreen)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kampana - 27 Aug 2004 07:45 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.