check ALT key during application-startup

I would like to check is "Alt" key is pressed when the application is starting (in the main "FormCreate" event). I checked the "OnKeyDown" event but does not work since the key is pressed before launching the application.
Who is Participating?
LischkeConnect With a Mentor Commented:
You need to check the key state asynchronly by:

  if GetAsynchKeyState(VK_MENU) < 0 then AltKeyPressed;

Ciao, Mike
No thanks and a B grading only. What's wrong with my answer? I doubt you won't get a better one...

Ciao, Mike
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.