|
-
Nov 17th, 2002, 02:14 AM
#1
Thread Starter
Fanatic Member
How to take a screenshot of the current PC? [sOLVEd]
How would I take a screeny of my PC, Like prnt scrn?
Last edited by scr0p; Nov 17th, 2002 at 01:56 PM.
asdf
-
Nov 17th, 2002, 02:26 AM
#2
PowerPoster
VB Code:
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, _
ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const VK_SNAPSHOT = &H2C
'Author: Dalin Nie (Edited by Matthew Gates)
'Origin: [url]http://www.vbcode.com/[/url]
'Purpose: This function capture the screen or the active window of your computer. Programmatically and save it to a .bmp file.
'VB version: VB 6,VB 5,VB 4/32
'Save Screen As Bitmap
Private Function SaveScreen(ByVal theFile As String) As Boolean
On Error Resume Next
'To get the Entire Screen
Call keybd_event(vbKeySnapshot, 1, 0, 0)
'To get the Active Window
'Call keybd_event(vbKeySnapshot, 0, 0, 0)
SavePicture Clipboard.GetData(vbCFBitmap), theFile
SaveScreen = True
Exit Function
End Function
'Usage
Call SaveScreen("C:\Windows\Desktop\shot1.bmp")
-
Nov 17th, 2002, 01:49 PM
#3
Thread Starter
Fanatic Member
Nevermind, I got it to take a screenshot of the full screen. Thanks, the commented out thing was supposed to be not commented.
THANKS
Last edited by scr0p; Nov 17th, 2002 at 01:57 PM.
asdf
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|