invisible page!!!!

group256

New member
Joined
Apr 16, 2008
Messages
1
Programming Experience
Beginner
I have a form, and there is an exit button on it, when I press exit, the current form goes to hidden mode and a new form pops up. But the problem is that I want the second form to stay up for a few seconds and then closes the application. So this is what I typed for the second form:

Threading.Thread.Sleep(3000)
Application.Exit()

so when I press on Exit the first form fades away the second one comes up, but here is the problem, none of the lables can be seen. Instead some white boxes can be seen(seems the window is not fully opened), then as it should after 3000 miliseconds it goes off. Please help me.

thanks
 
Thread.Sleep is not good on UI thread, it stops everything in the thread. Use a timer.
 
Back
Top