arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How To Make A Basic Calculator With "Visual Basic"
#1
..::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 Wink
Regards,
YoUsSeFbAsHa




person_pin_circle Users browsing this thread: 10 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting