C# Programming
04-22-2009, 10:52 PM
hi everyone, http://www.barakasoft.com/script/Forums/Images/smiley_shucks.gif
i have a code like this:
if (condition == true)
{
Thread t = new Thread(new ParameterizedThreadStart(Func));
t.Start(param);
}
.
.
.
//and func is:
Func(Object o)
{
Form1 form = new Form1(o);
form.Visible = true;
}
but when the thread starts, my form appears and suddenly it disappears http://www.barakasoft.com/script/Forums/Images/smiley_frown.gif . it seems thread ends the form process. what should i do? http://www.barakasoft.com/script/Forums/Images/smiley_tongue.gif
thanks in advanced
i have a code like this:
if (condition == true)
{
Thread t = new Thread(new ParameterizedThreadStart(Func));
t.Start(param);
}
.
.
.
//and func is:
Func(Object o)
{
Form1 form = new Form1(o);
form.Visible = true;
}
but when the thread starts, my form appears and suddenly it disappears http://www.barakasoft.com/script/Forums/Images/smiley_frown.gif . it seems thread ends the form process. what should i do? http://www.barakasoft.com/script/Forums/Images/smiley_tongue.gif
thanks in advanced