My code:
public class aaa
{
public void ShowWelcomeWind ow()
{
Form welcome = new Form();
try
{
welcome.ShowDia log();
}
catch(ThreadAbo rtException)
{
// No exception ...
}
finally
{
welcome.Dispose ();
}
}
}
Now:
aaa a = new aaa();
ThreadStart tH = new ThreadStart(a.S howWelcomeWindo w);
Thread t = new Thread(tH);
t.Start();
while(t.ThreadS tate != ThreadStates.Ru nning)
{
Thread.Sleep(10 0);
}
t.Abort();
t.Join();
Why after running this code window showed by aaa class
some times releases immediately and some times it waits for
user action such a mouse move before releases?
public class aaa
{
public void ShowWelcomeWind ow()
{
Form welcome = new Form();
try
{
welcome.ShowDia log();
}
catch(ThreadAbo rtException)
{
// No exception ...
}
finally
{
welcome.Dispose ();
}
}
}
Now:
aaa a = new aaa();
ThreadStart tH = new ThreadStart(a.S howWelcomeWindo w);
Thread t = new Thread(tH);
t.Start();
while(t.ThreadS tate != ThreadStates.Ru nning)
{
Thread.Sleep(10 0);
}
t.Abort();
t.Join();
Why after running this code window showed by aaa class
some times releases immediately and some times it waits for
user action such a mouse move before releases?
Comment