Form Focus Problem

S

shajeel

Hi,

i m having a problem getting the focus on the form, i m starting two
form one after another, here is the sequence. first is splash second is
dialog taking values

main()
{
Start new thread and start splash in it with Application.Run() or
splash.ShowDialog

After some work i closed it with splash.close

starts second form with application.run() or form.showdialog
}

second form is not selected when launched, if i set topmost it is above
all but values cannot be entered. when i close splash focus goes to any
other window below it, like VS or windows explorer.

Thanks in advance.
 
S

shajeel

it is bit long so i will send some part, i m starting splash in
constructor of form1. i hope this description clearly shows my problem.


main()
{

Form1 frm= new Form1();

Application.Run(frm);

}

public Form1()
{
splash = new frmSplashScreen();
//set splash screen properties
Thread splashThread = new Thread(new ThreadStart(startSplash));
splashThread.Start();

//change splash according to this changes in this thread

//after some time

splash.Close();
}

startSplash()
{
Application.Run(splash);
}
 

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