$ 0 0 If you only want to close it (do not show the time left on the MessageBox or anything like that), use a System.Timers.Timer.