Maha

Maha

  • NA
  • 0
  • 326.3k

Main Window

Sep 20 2014 1:20 PM
Book says that:

CREATING A Form THAT Is A PROGRAM'S MAIN WINDOW

You can instantiate a Form within an application and use the ShowDialog() method to display it, as in the program in Figure 9-15. Alternatively, you can create a child class
from Form that becomes the main window of an application. When you create a new
main window, you must complete two steps:

•You must derive a new custom class from the base class System.Windows.Forms.Form.

•You must write a Main() method that calls the Application. Run() method, and you must pass an instance of your newly created Form class as an argument. This activity starts the program and makes the form visible.

Why is it called Main Window? Problem is highlighted.


Answers (2)