The main window is the first created window or form in your application. Closing the main window implies closing all other opened windows and quitting the application.