KNOWN VISUAL BASIC (Part 4)
1. EVENTS AND PROPERTY
1.1. Creating User Interface
Programming Visual Basic is a visual programming, where it conducted the program using visual media, or often referred to as user-interface. Which means that creating the program generated by the program view, the program code (scripts) are placed each component.
Example 1:
Create a new project with StandartEXE to make a simple user interface with components involving Label, Textbox and a CommandButton on the Toolbox on the left side of the interface such as Visual Basic 2.1 and image Figure 2.2 below:
Figure 2.1. Components used
Use the components as in Figure 2.1 to create a form in the figure 2.2. follows:
Figure : 2.2
To set the location live using "drag & drop" with the mouse. This program is not finished because it is still necessary arrangements and additional event properties in each component to provide an acceptable display by the user and can run the process.
Figure 2.3
Figure : 2.2
To set the location live using "drag & drop" with the mouse. This program is not finished because it is still necessary arrangements and additional event properties in each component to provide an acceptable display by the user and can run the process.
1.1. Set the Property
Property on the display the Visual Basic interface is located on the right, as Figure 2.3 below:
Property on the display the Visual Basic interface is located on the right, as Figure 2.3 below:
Figure 2.3
In example 1 above, the components used are Label1, Label 2, text1, Command1 and Command2. Set the properties of each component is as follows, thus producing an image display as 2.4. Table 2.1. Property settings for example 2 :
Results form after the set is propertynya:
Figure 2.4. Results show an example form 2Each component has different properties and numerous, but there are some properties that are often used in each component, among others [Caption]. Property is often used to form include:
• Name: declare the name of the object is a very useful form to call and save the form.
• Caption: used to give the title to the form.
• StartUpPosition: used to put the form when the form is called or active. There are four choices are: Manual, CenterOwner, CenterScreen, Windows Default,
• Name: declare the name of the object is a very useful form to call and save the form.
• Caption: used to give the title to the form.
• StartUpPosition: used to put the form when the form is called or active. There are four choices are: Manual, CenterOwner, CenterScreen, Windows Default,