Back from Application.Run to place where was is called

C

cube

In thread i've got something like this

Application.Run(new Form());

But programm shows Form and waits for events.

Is there any solution to back from Form()? whithout Application.Exit or
Application.ExitThread ?

cube
 
R

Russ Bishop

Why would you be using application.run if you don't want a standard message
pump?

in your code just create a new instance of the form and then call
form.show(). then the current thread will continue on while the form goes
off on its own. But if your current thread ever ends, your app may exit and
take the open forms with it.

I'd suggest creating a separate thread before app.run to put background work
in.

-- russ
 
T

Tim Dawson

You could listen for the Application.Idle event, which will be fired once
your form has been shown and there's no further processing to be done.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top