Without modifying the form itself, can we make the from only show for some specific time, say 5 minutes.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could do:
But at it’s core, that’s semantically equivalent to using a timer. The only difference is that the timer will pick a thread from the thread pool and in the “sleep” case you’d have to allocate the thread your self. I would advocate that’s better to use the thread pool where you can, which means you should just use a timer.
FYI: You can use a timer without using a
System.Windows.Forms.Timercontrol by using theSystem.Threading.Timerclass. That would allow you to do what you want without having to modify the form.