Usa Este Codigo
'' Estas son las contantes necesarias para manejar el evento de teclado Private Const KEYEVENTF_KEYDOWN As Integer = & H0 Private Const KEYEVENTF_KEYUP As Integer = & H2
'' method for comparing a pair of key events _ Closed common routine keybd_event (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As UInteger, ByVal dwExtraInfo As UInteger)
End Sub
'' usalo cuando quieras este codigo simula presionar '' TAB y luego soltar el boton
keybd_event (CByte (Keys.Tab), 0, KEYEVENTF_KEYDOWN, 0) keybd_event (CByte (Keys.Tab), 0, KEYEVENTF_KEYUP, 0)
'' aqui se simula presionar la tecla de windows y TAB seguidas para despues soltarlas
keybd_event (CByte (Keys.LWin), 0, KEYEVENTF_KEYDOWN, 0) keybd_event (CByte (Keys.Lab), 0, KEYEVENTF_KEYDOWN, 0)
keybd_event (CByte (Keys.Tab), 0, KEYEVENTF_KEYUP, 0) keybd_event (CByte (Keys.LWin), 0, KEYEVENTF_KEYUP, 0)
source share