Home All Groups Group Topic Archive Search About

How to show a form in another thread

Author
13 Dec 2006 10:28 PM
Robert Dufour
I have an app with code that continuously executes on a form in a timer
control. I also need to show another form without interrupting the code
executing in this timer. I suspect that to do that I will need to launch the
other form in its own thread.

Any sample code on how to do this?

Thanks for any help,
Bob

Author
13 Dec 2006 10:48 PM
Spam Catcher
"Robert Dufour" <bduf***@sgiims.com> wrote in
news:e0GT0YwHHHA.3668@TK2MSFTNGP02.phx.gbl:

> I have an app with code that continuously executes on a form in a
> timer control. I also need to show another form without interrupting
> the code executing in this timer. I suspect that to do that I will
> need to launch the other form in its own thread.

I you call "show form" rather than showdialog, your thread will not be held
up.
Author
14 Dec 2006 7:19 PM
Robert Dufour
Thanks, I wasn't sure of that, that keeps it simple.
BOB
Show quoteHide quote
"Spam Catcher" <spamhoneypot@rogers.com> wrote in message
news:Xns9898B51633191usenethoneypotrogers@127.0.0.1...
> "Robert Dufour" <bduf***@sgiims.com> wrote in
> news:e0GT0YwHHHA.3668@TK2MSFTNGP02.phx.gbl:
>
>> I have an app with code that continuously executes on a form in a
>> timer control. I also need to show another form without interrupting
>> the code executing in this timer. I suspect that to do that I will
>> need to launch the other form in its own thread.
>
> I you call "show form" rather than showdialog, your thread will not be
> held
> up.
Author
17 Dec 2006 6:04 PM
Dennis
If you do show a form from another thread, then won't that thread become
another UI thread and all messages to the form will have to be handled in
that thread?  Just trying to understand the process.
--
Dennis in Houston


Show quoteHide quote
"Robert Dufour" wrote:

> Thanks, I wasn't sure of that, that keeps it simple.
> BOB
> "Spam Catcher" <spamhoneypot@rogers.com> wrote in message
> news:Xns9898B51633191usenethoneypotrogers@127.0.0.1...
> > "Robert Dufour" <bduf***@sgiims.com> wrote in
> > news:e0GT0YwHHHA.3668@TK2MSFTNGP02.phx.gbl:
> >
> >> I have an app with code that continuously executes on a form in a
> >> timer control. I also need to show another form without interrupting
> >> the code executing in this timer. I suspect that to do that I will
> >> need to launch the other form in its own thread.
> >
> > I you call "show form" rather than showdialog, your thread will not be
> > held
> > up.
>
>
>