Author Topic: Visual Basic (5)  (Read 1456 times)

Offline JokeBOx

  • Advanced Member
  • *
  • Topic Author
  • Posts: 206
  • Karma: +8/-27
  • HELLO!!!!!!!!!!!!!!!
  • Awards Winner of 1 Photoshop Challenge Contest [COMMON]
    • View Profile
    • Awards
Visual Basic (5)
« on: February 05, 2012, 11:32 »
So to recap things first appearance on the program to continue with the program codes. With the opening of a new project selecting standard. Exe project in the form of the program draw objects that we need to display data or based on some of our input data to perform certain functions. Facilities draw on his own desire and the menu properties of each object we choose its features. In each of the facilities and in the form of the program can write code that will meet our needs.

There are several important ways to set the program to execute many commands by writing a little code than you normally would. As the first and most important command is to check whether the program is true or not true, or whether something is so or not be selected appropriate.

This command is written as follows

If А =1 then
    А=2
End if


In this command check whether the value of A = 1. If one then we can change in 2, and if nothing happened, that A will have the value and further which is different from the first

If А =1 then
    А=2
Else
    A=5
End if


With this command check whether A = 1 if January is changing in the A = 2, but if not equal to 1, then the value of A now edit and A = 5. This translation would mean.

If A = 1 then
     A = 2
Other (if not)
     A = 5
end if

Example program
If Text1.Text = "Merkur" Then
     MsgBox "True Answer", vbOKOnly, "Answers"
Else
     MsgBox "Sorry Wrong Answer", vbOKOnly, "Answers"
End If

THATS FROM ME CYA!!!