Beruflich Dokumente
Kultur Dokumente
You can change the form text to "your name's calculator". Click on the form and
then go to properties window, then change the text property.
You also need to disable the maximize control of the form. That's because you
don't want the user to maximize the calculator. Go to the properties window, and
change the maximize box property to False:
You might be surprised of this button because we should have placed a textbox
instead. Well, this is the cool thing about Visual Basic, you can use a button to
display text and results.
Now we have to change the button properties to look like a text box.
First we change it's text to "0.".
We align the text to be on the right. Right click on the button, click on properties. In
the properties window change TextAlign to MiddleRight:
Choose the box in the middle right (the blue one in the image above)
You also need to change the color of the button. Go to the properties window and
change the backcolor property to white:
There are two more properties you need to
change: TabStop to False and Enabled to False.
Add four buttons. Start by adding the button on the left (1) then (2) then (3) then (4)
Add four more buttons in the same order as shown below and change their text to
1, 2, 3, -
Add four more buttons in the same order as shown below and change their text to
0, . , =, +
Add the last two buttons to the calculator in order as shown below and change
their text to Clear, Exit:
Page3
Go to the code page and add the following declarations:
?
1Dim value1 As String = ""
2Dim value2 As String = ""
3Dim value3 As Double = 0.0