SendKeys.SendWait () is not working in a particular application

0

I have software for my tcc, where I am emulating the pressing of a key using SendKeys.SendWait("{F12}") .

I created the methods and everything right and I went to test, but in the application that I need it to work, it is not working ... I tested it in the browser, in word and the command works,

I'm going to leave my code and the software I'm trying to use.

The language I'm using is VB.Net

Private Sub EmulaPressionamentoTecla()
    SendKeys.SendWait("{F12}")
End Sub

The software I need to work on is ACAT, even software that Stephen Hawking used to communicate ...

link

    
asked by anonymous 23.11.2018 / 16:49

1 answer

0

Try placing the following function in the (New) constructor or in the event (Load):

Me.KeyPreview = True

In this case it will detect the pressing of any key and you need to develop the routine that will select which key or key combination you want a routine to trigger.

Private Sub GUI_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown

    If e.KeyCode = Keys.Escape Then

        'Faz alguma coisa

    End If

End Sub
    
26.11.2018 / 18:29