Is it possible to have the form output the command for the computer to do the same thing as print screen key or some of the window based keys?
------------------
Printable View
Is it possible to have the form output the command for the computer to do the same thing as print screen key or some of the window based keys?
------------------
You can use Sendkeys to Mimic most Windows Keypresses, or the Keybd_Event API, the only way to Mimic the Print Screen Key is to use the Keybd_Event with the VK_SNAPSHOT Const, ie.
------------------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
Private Sub cmdFullScreen_Click()
'Send Copy of the Whole Screen to the Clipboard
keybd_event VK_SNAPSHOT, 1, 0, 0
End Sub
Private Sub cmdWindow_Click()
'Send Copy of the Active Window to the Clipboard
keybd_event VK_SNAPSHOT, 0, 0, 0
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]
[This message has been edited by Aaron Young (edited 01-27-2000).]