I have an executable VB file that i want to start on the press of a certain function key or may be a combination of keys.Is that possible? If yes then how?Thanks in advance for any reply.
Printable View
I have an executable VB file that i want to start on the press of a certain function key or may be a combination of keys.Is that possible? If yes then how?Thanks in advance for any reply.
private Sub Form_KeyPress(KeyAscii as Integer)
If KeyAscii = vbKeyA then
Call Shell("c:\MyApp.exe")
End If
End Sub
----------
The @host is everywhere!
----------
You can also do it like this:
private Sub Form_KeyPress(KeyAscii as Integer)
If KeyAscii = vbKeyA then
call winexec("c:\MyApp.exe",1)
End If
End Sub
But then you'll have to add the Winexec API function in General Declarations
F. T. W.