Can i show a form in a thread ?
C#
2
Posts
2
Posters
0
Views
1
Watching
-
i want to create a form and show it in a thread. Like this code: Thread th = new Thread(new ThreadStart(t)); t.Start(); void t() { Form2 f2 = new Form2(); f2.Show(); } ----------------------- But it doesnt work. How to deal with it ?
what is happening is your thread starts and shows the form and then it's done showing the form and the thread "dies". Do you see the form flash real fast? I believe you have to make your form modial. AND to do this, use
.ShowDialog()
instead of.Show()
happy birthday /\ |_ E X E GG