Application Startup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear Sirs,

I can I know when my app starts if the shift key is pressed?

Or better, I want that when somebody click on the icon to start the
application if the shift key is pressed to enter in a config mode.


Thanks in advance

Luis
 
I'm not entirely sure that you can. I'm pretty sure it's not passed to
the application. However the second your application has started you
can work out if it's down with something like this:

public sub main()


If (My.Computer.Keyboard.ShiftKeyDown) Then
frmConfig.showDialog()
else
frmMain.showDialog()
end if

end sub

- Of course if you hold down shift, double click the key and take your
finger off shift before the application really starts then it may miss
the event. This is more like "If shift is held down when the
application STARTS, rather than when the icon is clicked"

Phill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top