Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15097

How to make Keyboard shotcuts work with the application minimized

$
0
0
Hi, i'm making an application to close MTA (a game) when it crashes. But when i click F7 inside MTA nothing happens, otherwise when i click f7 with the form.exe open the MTA close. Can someone helps me with that?

wich modifications do i have to make to close MTA with the .exe minimized?





Code:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    'make sure KeyPreview is True on Form Properties
    On Error Resume Next
    Select Case KeyCode
        Case vbKeyF7
            Shell "taskkill /f /im ""proxy_sa.exe"""
            MsgBox "MTA Finalizado com sucesso.", vbInformation, "Aviso"
           
    End Select
End Sub

Private Sub Text1_Change()
txt.Value = "Pressione F7 para finalizar o MTA San Andreas"
lbl.Caption = "Oi"

End Sub


Viewing all articles
Browse latest Browse all 15097

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>