visual studio how to finish a windows form project for use code example Example: c# program exit System.Windows.Forms.Application.ExitThread( )