|
-
Oct 5th, 2000, 04:37 PM
#1
Thread Starter
Need-a-life Member
-
Oct 5th, 2000, 05:51 PM
#2
_______
<?>
'give this a shot..I find sometimes it acts up and grabs the whole screen and I don't know why.
'
Code:
Private Declare Sub keybd_event Lib "user32" _
(ByVal bVk As Byte, ByVal bScan As Byte, _
ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Public Sub CaptureScreen(ByVal sFileName As String)
Call keybd_event(vbKeySnapshot, 0, 0, 0)
SavePicture Clipboard.GetData(vbCFBitmap), sFileName
DoEvents
End Sub
Private Sub Command1_Click()
Call CaptureScreen("C:\my documents\asdfg.bmp")
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Oct 6th, 2000, 09:56 AM
#3
Thread Starter
Need-a-life Member
I gave it a shot. It seems to work. And I guess I already know why it captures the whole screen. However I don't know how not to do it. The Function captures the whole active "window". And if your app is an MDI project, your active window would be your app's parent. By the way, does anybody knows how to capture one of its child window?
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Oct 6th, 2000, 10:08 AM
#4
_______
<?>
'that's what I mean by acting up
try this:
Call keybd_event(vbKeySnapshot, 1, 0, 0)
the 0,0,0 is supposed to get only the form
the 1,0,0 is supposed to get the screen
but for reasons unknown to me It screws up
There is a good app I once had and I will look for it
again that handles different versions or how to do this.
I will look for it and if you send me and email and I find
it I will send it to you.
Wayne
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Oct 6th, 2000, 10:22 AM
#5
_______
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Oct 6th, 2000, 11:21 AM
#6
Thread Starter
Need-a-life Member
EXCELLENT!! That was what I was needing. THANKS A LOT!
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
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
|