|
-
Jan 5th, 2002, 01:34 PM
#1
Thread Starter
Fanatic Member
full screen to clipboard (instead of active window)
Is there a quick way to do this?
-
Jan 5th, 2002, 01:37 PM
#2
PowerPoster
Yes, instead to giving it HWND of the window, you give the HWND of the desktop by first getting the HWND using "GetDesktopWindow()".
-
Jan 5th, 2002, 01:44 PM
#3
Thread Starter
Fanatic Member
uh oh . . . I've been using alt + print screen, I'm not too clear on HWND and GetDesktopWindow().
-
Jan 5th, 2002, 01:50 PM
#4
PowerPoster
Oh ok, If you are using that method, then instead of using "alt + print", use "print".
-
Jan 5th, 2002, 01:54 PM
#5
Here is a quick example
VB Code:
Option Explicit
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
Private Sub Command1_Click()
Clipboard.Clear
' Get the Entire Screen
keybd_event vbKeySnapshot, 1, 0, 0
End Sub
Private Sub Command2_Click()
Clipboard.Clear
' Get the Active Window
keybd_event vbKeySnapshot, 0, 0, 0
End Sub
Private Sub Form_Load()
Command1.Caption = "Full Screen"
Command2.Caption = "Active Window"
End Sub
-
Jan 5th, 2002, 02:03 PM
#6
Thread Starter
Fanatic Member
LOL . . . Let me get this straight, you mean I've got to press Print Screen instead of Alt + Print Screen??? Wait a minute, let me write that down . . . (How could I not have at least tried that?)
The code snipped is pretty handy, too. Thanks guys!
-
Jan 5th, 2002, 02:37 PM
#7
The picture isn't missing
gee i thought everyone knew that i knew when i was 10!
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Jan 5th, 2002, 02:48 PM
#8
Thread Starter
Fanatic Member
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
|