Learn programming whit visual basic / PDF

Learn programming whit visual basic / PDF






Learn programming whit visual basic / PDF














Introduction
Visual Basic was developed by Microsoft to extend the capabilities of BASIC by adding objects
and “event-driven” programming: buttons, menus, and other elements of graphical user interfaces
(GUIs). Visual Basic can also be used within other Microsoft software to program small routines.
(From Britannica Encyclopedia)


Example: Draw two commands and change their Caption properties to English and Kurdish.

Solution:

1. We can change the caption property of a command from the property window of the command.

2. we can change the caption property of a command by coding the form load in this way

*Double click on the form load and write { command1.caption = “Kurdish”} press enter and
write {command2.caption = “English”}

**Coding commands
We can write codes for a command by double clicking on the command.
A window will appear starting with Private Sub Command2_Click() and ends with End Sub
And you must write your codes in between them.

Example:

Draw a Label and two Commands
Write the codes in the first command so that when you click on it the label will show
(Kurdistan)
And when you click on the second command the label will show (Turkey)
Change their Caption property to Kurdish and Turkish

Solution
Draw two commands and a Label
Double click on the first command and write.
Private Sub Command1_Click()

Label1.Caption = "Kurdistan"
End Sub
Double click on the second command and write.
Private Sub Command2_Click()

Label1.Caption = "Turkey"
End Sub

Finding Area
In this lecture we are going to use what we have learned before for finding area of regular shapes.........





Download Learn programming whit visual basic / PDF









Learn programming whit visual basic / PDF


0 commentaires: