I have an application which loads a main form which contains text boxes and
other details. This main form has a menu which opens another form. I want to
have both forms accessible (i.e. I don't want the second form to be modal).
However, I *do* want users to keep working in the second window and only
switch to the main window when they need to. Unfortunately, after performing
one or two functions (I'm writing in C# in the .NET Framework -- 2003) in
the second window, the FIRST WINDOW grabs the focus... and I can't find a
way of forcing the second window to KEEP THE FOCUS!!!!

Please help.

Re: Form Focus Problem by Marcos

Marcos
Sat Jan 08 10:37:05 CST 2005

Are you running the second form in the same thread as the first one? Does
the second form have its own message pump? It's hard to speculate without
seeing how you're invoking the second form, but my first inclination would
be to recommend that you try creating a separate thread for the second form,
and in that thread, calling Application.Run(new mySecondForm).

"XVida" <michael.barber@designomics.co.uk> wrote in message
news:OFMDd.27085$C8.7210@fe3.news.blueyonder.co.uk...
>I have an application which loads a main form which contains text boxes and
>other details. This main form has a menu which opens another form. I want
>to have both forms accessible (i.e. I don't want the second form to be
>modal). However, I *do* want users to keep working in the second window and
>only switch to the main window when they need to. Unfortunately, after
>performing one or two functions (I'm writing in C# in the .NET Framework --
>2003) in the second window, the FIRST WINDOW grabs the focus... and I can't
>find a way of forcing the second window to KEEP THE FOCUS!!!!
>
> Please help.
>
>



Re: Form Focus Problem by Tim

Tim
Tue Jan 11 03:23:45 CST 2005

Form1.Enabled = False?