Is it possible to pick up if a user is holding down a key as they double click a created .exe file? I was wondering if I could set my application to go into a 'configure mode' if started by with a double click when say shift held down.
cheers
Printable View
Is it possible to pick up if a user is holding down a key as they double click a created .exe file? I was wondering if I could set my application to go into a 'configure mode' if started by with a double click when say shift held down.
cheers
i think so...(not sure how exactly but...)
maybe in the Sub Main() capture the keyboard and check which key is being held...then start the appropriate form.
VB Code:
Private Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Long) As Integer Sub Main() Do For i = 3 To 255 If GetAsyncKeyState(i) Then If i = vbKeyShift then 'may need the value of shift form2.show Exit Sub End If End If Next DoEvents Loop End Sub
That could be completely wrong...(like vbKeyShift)
but hey..give it a shot...cant test here at work
ta geoff_xrx I will try that when I get home
:)