G
Guest
I am working on a program where I need 2 things to happen at the same time.
The form needs to load and at the same time I want to start a timer which
after a certain amount of time kills the entire application. The user has to
click submit on the form within 2 minutes, or else I want something else to
happen. For example, lets say I want a form to open and say the computer is
going to logoff in 2 minutes. The user can select logoff now, or the user
can ignore the form, in which case the form logs off after 2 minutes. I have
tried using the System.Threading.Timers, with the Wait.Any method, but I
don't seem to be able to use that with Application.Run, which causes one of
the two things to happen but not both at the same time. Does anyone have any
suggestions?
The form needs to load and at the same time I want to start a timer which
after a certain amount of time kills the entire application. The user has to
click submit on the form within 2 minutes, or else I want something else to
happen. For example, lets say I want a form to open and say the computer is
going to logoff in 2 minutes. The user can select logoff now, or the user
can ignore the form, in which case the form logs off after 2 minutes. I have
tried using the System.Threading.Timers, with the Wait.Any method, but I
don't seem to be able to use that with Application.Run, which causes one of
the two things to happen but not both at the same time. Does anyone have any
suggestions?