Monday, June 6, 2011

Creating a program in VB 2008 Addition

Creating a program in VB 2008 Addition

Finally I can give visual basic programming articles my first 2008. We learn from the most basic first ya friends. This time I want to provide materials on how to program the sum in vb 2008. Well, after you are at page work vb 2008, then you have to do is create a form as below.

Sorry if not good formnya design. But our first try is like this. Well, to create a form like this, how to drag the label contained in the toolbox into the form and then in the Properties box look for writing text, then replace the text Label1 with A:. Next drag the TextBox to the form and place it in addition to writing A: or in addition to Label1. Follow the steps above to make a B. Then drag the Button and place it under textbox2. In the Properties box, change the Text on button1 to "count". Well, now you have to know how to make the design program. Next, your job is to create a design form as shown above. You can design your programs as they pleased, provided a neat and pleasing to the eye of the eye.
Next click on the button1 twice or count. Then enter the following code.

Private Sub Button1_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) handles Button1.Click
TextBox3.Text = Val (textBox1.Text) + Val (TextBox2.Text)
End Sub
End Class

Explanation: The red color code above is code that is contained or directly there when we had double-click on button1, or measure. While we add or enter the code orange.
The definition of code orange is, if button1 is clicked, the value of teksbox3 is the result of the sum value and teksbox2 teksbox1.

Then, double click on button2 or exit. Next add the following code:

Private Sub Button2_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) handles Button2.Click
End
End Sub
End Class

End Function of code is to stop the program.
Well, if it is to press F5 to compile and run the program. If you have, and successful, then the program will run, you can try to input some numbers. Approximately result will be like the picture below.

Well, if the program is running well, you can compile your programs by clicking the Build menu, then click the Windows Desktop Build and wait for the compilationcompleted . Then save the program by clicking File, Save All.

So that I can explain about the basic programming visual basic 2008 this time. Sorry if I'm way less good submission.

No comments:

Post a Comment

 
THANK YOU FOR VISITING