Ya encontre la forma para activar botones con el
keybd_event
Esta direccion tiene todas las formas de activar los diversos botones
http://thedotnet.com/nntp/47170/showpost.aspx
David aca tengo este codigo:
Código PHP:
Public Class Form1
Dim stopWatch As New Stopwatch
Private Const VK_LCONTROL = &HA2
Private Const VK_S = &H53
Private Const VK_TAB = &H9
Private Const VK_SPACE = &H20
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 Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Command1_Click()
End Sub
Private Sub Command1_Click()
keybd_event(VK_SNAPSHOT, 1, 0, 0)
keybd_event(VK_LCONTROL + VK_S, 1, 0, 0)
keybd_event(VK_TAB, 1, 0, 0)
keybd_event(VK_SPACE, 1, 0, 0)
End Sub
Private Sub TimerCrono_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If stopWatch.IsRunning Then
Dim ts As TimeSpan = stopWatch.Elapsed
Me.textbox1.Text = String.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10)
End If
End Sub
End Class
Si corro este codigo, cuando oprimo el boton para activarlo obviamente va a funcionar las teclas (Ctrl+S,Tab,Space) que le puse en la ventana donde oprimi el boton.
Si ves puse un timer esta listo para solo agregarle un
StopWatch.start() y empieza a caminar, lo que no se es como hacer para que cada 5 minutos se ejecute esta herramienta.
Gracias por la ayuda