Presentation is loading. Please wait.

Presentation is loading. Please wait.

Teacher: Ms. Olifer MICROSOFT VISUAL STUDIO 2010: PROPERTIES OF WINDOWS FORM OBJECT.

Similar presentations


Presentation on theme: "Teacher: Ms. Olifer MICROSOFT VISUAL STUDIO 2010: PROPERTIES OF WINDOWS FORM OBJECT."— Presentation transcript:

1 Teacher: Ms. Olifer MICROSOFT VISUAL STUDIO 2010: PROPERTIES OF WINDOWS FORM OBJECT

2 PROPERTIES Splash Screen is the first image that appears when application is started. Select the Windows Form object by clicking on it in the designer window. Example: System.Windows.Forms.Form A class definition is a block of code that specifies (or defines) the attributes and behaviors of an object. The period that separates each word in System.Windows.Forms.Form is called the dot member access operator, which indicates the hierarchy of namespaces.

3 PROPERTIES You use the name entered in an object’s Name Property to refer to the object in code. The name must begin with a letter and contain only letters, numbers, and the underscore character. You cannot use punctuation characters or spaces in the name. Text Property controls the caption displayed in the form’s title bar. StartPosition Property specifies the starting position of the form. FormBorder Style controls the border of the form. Font specifies the font used for text.

4 TOOLBOX WINDOW The Toolbox window contains the tools you use when creating your application. Each tool in the toolbox represents a class. Each tool could be modified (size, location, etc.) To lock the form: either click on the form  Format  Lock controls, or right-click on the form and select Lock.

5 TOOLS You use the Label tool to instantiate a label control. The purpose of a label control is to display text that the user is not allowed to edit while the application is running. Also used to identify other controls and display program output. You use the Button tool to instantiate a button control. In Windows applications, a button control is used to perform an immediate action when clicked. The name of the button should end with the word Button, which is the name of the class.

6 THE CODE EDITOR WINDOW The set of Visual Basic instructions, or code, that tells an object how to respond to an event is called an event procedure. The Class statement begins with the Public Class MainForm instruction and ends with the End Class instruction. The procedure header begins with the two keywords Private Sub. A keyword is a word that has a special meaning in a programming language.

7 THE CODE EDITOR WINDOW (CON-D) The Private keyword indicates that the procedure can be used only within the class in which it is defined. The Sub keyword is an abbreviation of the term sub procedure, which, in programming terminology, refers to a block of code that performs a specific task. An assignment statement assigns a value to something, such as the property of a control. An assignment statement that assigns a value to the Text property of a control follows the format control.Text = “string” Example – greetingLabel.Text = “Hello”


Download ppt "Teacher: Ms. Olifer MICROSOFT VISUAL STUDIO 2010: PROPERTIES OF WINDOWS FORM OBJECT."

Similar presentations


Ads by Google