Skip to content

Selecting/Focusing a window

Ryan

Asked Jun 28, 2007, 12:02 PM EDT1 answer
Share
LinkedInX
Heres the scenario: I initially load a splash screen. The splash goes away, and the main application opens, but does not have window focus because a different window that i have opened (like firefox), maintains focus. How do I select this window to have focus? The following did not work:

this.focus();

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Are you using MDI? If so you could just do something like:

    FocusForm newForm = new FocusForm();
    newForm.Activate();

    newForm is a created reference to the form you want to obtain the focus.

    0