Lesson 2 is about statement
Step:
1. create command button on the form
click the command button, and set the properties:
name: cmd_msg
caption: click me
2. double click the command button, and it's open the code box like this:
private sub cmd_msg_click()
' you put your statement here
end sub
3. first statement that I give you is MsgBox.
type your statement: msgbox "how"
example:
private sub cmd_msg_click()
msgbox "how"
end sub
4. run the program, and click the button. It will pop up the messagebox says "how"
without ".
Just try it and you will understand little a little about statement and properties.
End of lesson 2.
Saturday, February 9, 2008
Lesson 1 ( English )
Lesson 1 is about the basic vb properties
note:
every example is on code ( just right click on form, and choose view code )
properties:
a)Name: form1, it is for access name.
example:
private sub form_load()
form1.caption = "hi" 'it's make form1 title to "hi" without ".
end sub
so, if we change Name: form1 to Name: newFrm, it would be like this:
private sub form_load()
newFrm.caption = "hi"
end sub
b)Caption: form1 title.
example:
caption : form1 'it's mean that form1 title is "form1"
form1.caption = "hi bobby!" 'it's make form1 title is "hi bobby!"
without ".
c)witdh and height, it used for change size of the form and others.
The properties it not only for forms, but others, like command button, label, etc.
end of Lesson 1.
note:
every example is on code ( just right click on form, and choose view code )
properties:
a)Name: form1, it is for access name.
example:
private sub form_load()
form1.caption = "hi" 'it's make form1 title to "hi" without ".
end sub
so, if we change Name: form1 to Name: newFrm, it would be like this:
private sub form_load()
newFrm.caption = "hi"
end sub
b)Caption: form1 title.
example:
without ".
c)witdh and height, it used for change size of the form and others.
The properties it not only for forms, but others, like command button, label, etc.
end of Lesson 1.
Subscribe to:
Posts (Atom)