|
-
May 12th, 2001, 05:51 AM
#1
Thread Starter
Addicted Member
Take Screen shot
How Can I Take Screen Shot Useing Api Function !
like to press PrintScreen Button And Then Past To picture file !
-
May 12th, 2001, 06:47 AM
#2
Addicted Member
-
May 12th, 2001, 07:34 AM
#3
Frenzied Member
Something like this:
Code:
Dim handle as Long
handle = GetDesktopWindow
Dim dc as Long
dc = GetDC(handle)
'then use BitBlt to get the whole dc (whole screen).
-
May 13th, 2001, 01:53 PM
#4
Member
Is there any easy way to get that image into a direct 3d texture (directx8)? (Preferably not by saving the image to disk and then loading it with D3DX.CreateTextureFromFile)
-
May 14th, 2001, 12:15 AM
#5
Thread Starter
Addicted Member
-
May 14th, 2001, 07:57 AM
#6
Member
The following code sends a "printscreen button pressed"-event to the active window. Perhaps someone else could modify it (using sendmessage?) to send it to the desktop?
Code:
Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _
bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Const VK_SNAPSHOT As Byte = 44
'and where you want to send the event place the following code
keybd_event VK_SNAPSHOT, 0, 0, 0
DoEvents 'to allow windows time to take the screenshot
'And finally use clipboard.getdata to put it in
'a picturebox or something...
When I put this in the form_load sub i got a nice screenshot of the VB window. Perhaps a compiled version will get one of the desktop (haven't tried that yet).
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
|