Print screen botton
-
- Posts: 84
- Joined: Tue Nov 26, 2002 1:01 am
- Contact:
Print screen botton
Hi,..<p>Does anyone know what is the code of the "print screen" botton using visual basic.??<p>i.e. How can I make the PC itself presses the "print screen" botton every certain interval.<p>Does anyone know the Keycode of the print screen botton.?????<p>Thanks for all your help <p>[ June 24, 2003: Message edited by: Michael Wahid ]</p>
Re: Print screen botton
Sorry Mike, Its taken me a while to come up eith it. Just copy and paste the code and run the program. It will copy the screen at your given interval. Just be sure to specify the interval, it is in miliseconds so 1000 ms = 1 sec.<p>Code:<p>Option Explicit<p>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_MENU = &H12
Private Const VK_SNAPSHOT = &H2C
Private Const KEYEVENTF_KEYUP = &H2<p>Private Sub Timer1_Timer()
' capture the whole screen
timer1.Interval =
keybd_event VK_SNAPSHOT, 0, 0, 0
keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0
End Sub<p>
Thats it.<p>Have fun<p>greg
Private Const VK_MENU = &H12
Private Const VK_SNAPSHOT = &H2C
Private Const KEYEVENTF_KEYUP = &H2<p>Private Sub Timer1_Timer()
' capture the whole screen
timer1.Interval =
keybd_event VK_SNAPSHOT, 0, 0, 0
keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0
End Sub<p>
Thats it.<p>Have fun<p>greg
-
- Posts: 84
- Joined: Tue Nov 26, 2002 1:01 am
- Contact:
Re: Print screen botton
THANKS VERY MUCH GREG, IT WORKS PERFECT. <p>
Re: Print screen botton
No trouble.
Who is online
Users browsing this forum: No registered users and 3 guests