Form - Introduction to Object-Oriented Programming

Essay by reeatchUniversity, Bachelor's July 2004

download word file, 3 pages 3.5

Downloaded 186 times

An object-oriented methodology has a defined set of entities: class, form, properties, and instances. A Form is a representation of any window displayed in your application. The Form class can be used to create standard, tool, borderless, and floating windows. You can also use the Form class to create modal windows such as a dialog box. Using the properties available in the Form class, you can determine the appearance, size, color, and window management features of the window or dialog box one is creating. The Class form can be used to define and edit the attributes of the class. Whenever a developer enters a change into the Class form, they take effect immediately.

In object-oriented programming, a method is a programmed procedure that is defined as part of a class and included in any object of that class. A class (and thus an object) can have more than one method.

A method in an object can only have access to the data known to that object, which ensures data integrity among the set of objects in an application. A method can be re-used in multiple objects. In addition to properties, one can use the methods of the class to manipulate a form. The events of the Form class allow a developer to respond to actions performed on the form. One can use a form as the starting class in an application by placing a method called Main in the class. In the Main method add code to create and show the form. One will also need to add the [STAThread] attribute to the Main method in order for the form to run. When the starting form is closed, the application is also closed.

In programming, instantiation is the creation of a real instance or particular realization of an abstraction...