Save Screen Capture to a file
So if below is my screen capture procedure , then how should I code the SavePicture
statement in order to save it into a file ?
Public Sub MyCapture(ByVal mode%)
altscan% = MapVirtualKey(VK_MENU, 0)
Screen.MousePointer = vbHourglass
If mode Then
keybd_event VK_MENU, altscan, 0, 0
' It seems necessary to let this key get processed before
' taking the snapshot.
' Why does this work? Who knows!
If mode = 0 And IsWindows98 Then snapparam = 1
DoEvents ' These seem necessary to make it reliable
' Take the snapshot
keybd_event VK_SNAPSHOT, snapparam, 0, 0
' If mode Then keybd_event VK_MENU, altscan, KEYEVENTF_KEYUP, 0
'cmdCaptureAll.Enabled = True
'cmdCaptureActive.Enabled = True
keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 ' release alt
keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0 ' release
Screen.MousePointer = vbDefault
' In order to capture active screen , u just call by typing'capture 1'
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL