Could anyone give me some info on the print screen command? I am trying to develop a progam that will take screenshots when the designated key is pressed. And then save it to a bmp file. Any info would be greatly appreciated :)
Printable View
Could anyone give me some info on the print screen command? I am trying to develop a progam that will take screenshots when the designated key is pressed. And then save it to a bmp file. Any info would be greatly appreciated :)
I believe this is what you are looking for.
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 Command1_Click()
keybd_event VK_SNAPSHOT, 0, 0, 0
End Sub
'If you want to capture the whole screen, use this:
keybd_event VK_SNAPSHOT, 1, 0, 0