I have a program where the main form is called (shown/activated) via a keystroke combination. When the form pops-up, I've set the focus to a textbox to begin typing right away.
When the keystroke occurs, I have:
And in the Form_Activated event:
Simple right? It works the way I want it to, even after i've compiled and run the EXE, but ONLY if Visual Studio 2008 is running. Once I close my project in VS, with the program still running outside VS, the form is shown, but input focus is not set to the textbox.
Any ideas on why having my projects' source open in VS has anything to do with running the compiled EXE of said program?
I've even tried API calls to SetForegroundWindow and ShowWindow with the same result.