|
August 30, 2002 Initializing the Windows Form Tips: August 2002
Yehuda Shiran, Ph.D.
|
|
A Windows form is defined by a class. This class includes the initialization of all form controls, such as panels, buttons, and text boxes. This class should include a function by the same name, which is the class constructor. Here is a definition of such a class (PanelForm):
The constructor function, PanelForm(), first sets three properties of the form (Text, ClientSize, and StartPosition):
The code above sets the text of the window (at the top bar), its size (300x350), and its position (CenterScreen).To learn more about JScript .NET and ASP.NET, go to Column 117, JScript .NET, Part XI: Creating Windows Forms.
People who read this tip also read these tips: Look for similar tips by subject: |