01-26-2017, 07:51 AM
..::Tutorial::..
Hello Guys,
I have just made a "Basic Calculator" That Can Calculate +,-,*,/ And I Wanna To Share It With You...
Requirements:
First Put 3 Labels.
Second Put 3 Textboxes Under Them And put spaces between them.
Third Add 4 Buttons And 1 if you want for Exit.
...........................................................................
Change the property "Text" Of the label1 To Number 1 , the second label (label2) To Number 2 and the third label (label3) To Result.
Put 2 Other Labels (label4,label5)
And put 1 between textbox1 and textbox2 and the another one put it between textbox 2 and textbox3 Then Change the property Text of label4 to (Nothing) and label5 to = .
Now Change The 4 Buttons Text (button1 to +),(button2 to -),(button3 to /) and (button4 to *).
And if you added button 5 make it Exit.
.....................................................................
Now Lets Code,
Call Button1 and the event Click
And type
Textbox3.text = Val(textbox1.text) + Val(Textbox2.text)
Label4.text = "+"
Call Button2 and the event Click
And type
Textbox3.text = Val(textbox1.text) - Val(Textbox2.text)
Label4.text = "-"
Call Button3 and the event Click
And type
Textbox3.text = Val(textbox1.text) / Val(Textbox2.text)
Label4.text = "/"
Call Button4 and the event Click
And type
Textbox3.text = Val(textbox1.text) * Val(Textbox2.text)
Label4.text = "*"
...............................................................
Call Button5 If you made it and set code to
End
Picture Of Codes: https://imgur.com/afxsOA9
Picture Of Form: https://imgur.com/U71iixu
App Link: https://www.solidfiles.com/v/Wdy5RKpG4qe5p
......................................................
Thats All,
Have A Nice Day! & Thanks For Reading if that helped you don't forget to give me a +Rep
Regards,
YoUsSeFbAsHa
Hello Guys,
I have just made a "Basic Calculator" That Can Calculate +,-,*,/ And I Wanna To Share It With You...
Requirements:
First Put 3 Labels.
Second Put 3 Textboxes Under Them And put spaces between them.
Third Add 4 Buttons And 1 if you want for Exit.
...........................................................................
Change the property "Text" Of the label1 To Number 1 , the second label (label2) To Number 2 and the third label (label3) To Result.
Put 2 Other Labels (label4,label5)
And put 1 between textbox1 and textbox2 and the another one put it between textbox 2 and textbox3 Then Change the property Text of label4 to (Nothing) and label5 to = .
Now Change The 4 Buttons Text (button1 to +),(button2 to -),(button3 to /) and (button4 to *).
And if you added button 5 make it Exit.
.....................................................................
Now Lets Code,
Call Button1 and the event Click
And type
Textbox3.text = Val(textbox1.text) + Val(Textbox2.text)
Label4.text = "+"
Call Button2 and the event Click
And type
Textbox3.text = Val(textbox1.text) - Val(Textbox2.text)
Label4.text = "-"
Call Button3 and the event Click
And type
Textbox3.text = Val(textbox1.text) / Val(Textbox2.text)
Label4.text = "/"
Call Button4 and the event Click
And type
Textbox3.text = Val(textbox1.text) * Val(Textbox2.text)
Label4.text = "*"
...............................................................
Call Button5 If you made it and set code to
End
Picture Of Codes: https://imgur.com/afxsOA9
Picture Of Form: https://imgur.com/U71iixu
App Link: https://www.solidfiles.com/v/Wdy5RKpG4qe5p
......................................................
Thats All,
Have A Nice Day! & Thanks For Reading if that helped you don't forget to give me a +Rep
Regards,
YoUsSeFbAsHa