how to makee my c sarp programm work when i leave the form code example Example: c# program exit System.Windows.Forms.Application.ExitThread( )