Form Design:
Form = 1
Command Button = 6
Text Box = 3
Label = 5
Properties Set:
| Object | Property | Settings | 
| Form1 | Caption Height Width BackColor MaxButton | Calculator  5310 5640 &H00004000& False | 
| Command1 | Name Caption  Height Width Left Top BackColor FontName FontStyle FontSize | cmdAdd + 375 615 2520 2400 &H00C0C0FF& Times New Roman Bold 18 | 
| Command2 | Name Caption  Height Width Left Top BackColor FontName FontStyle FontSize | cmdSubs - 375 615 3240 2400 &H00C0C0FF& Times New Roman Bold 18 | 
| Command3 | Name Caption  Height Width Left Top BackColor FontName FontStyle FontSize | cmdMult * 375 615 3960 2400 &H00C0C0FF& Times New Roman Bold 18 | 
| Command4 | Name Caption  Height Width Left Top BackColor FontName FontStyle FontSize | cmdDivide / 75 615 4680 2400 &H00C0C0FF& Times New Roman Bold 18 | 
| Command5 | Name Caption  Height Width Left Top BackColor FontName FontSize | cmdClear Clear 375 1095 2640 4320 &H00C0E0FF& MS Sans Serif 8 | 
| Command6 | Name Caption  Height Width Left Top BackColor FontName FontSize | cmdExit Exit 375 735 4680 4320 &H00C0E0FF& MS Sans Serif 8 | 
| Text1 | Name Alignment Text Height Width Left Top BackColor ForeColor FontName FontSize | txtNumber1 2 - Center [blank] 615 2775 2520 480 &H00FFFFC0& &H00FF0000& MS Sans Serif 12 | 
| Text2 | Name Alignment Text Height Width Left Top BackColor ForeColor FontName FontSize | txtNumber2 2 - Center [blank] 615 2775 2520 1440 &H00FFFFC0& &H00FF0000& MS Sans Serif 12 | 
| Text3 | Name Alignment Text Height Width Left Top BackColor ForeColor FontName FontSize | txtAdd 2 - Center [blank] 615 2775 2520 3360 &H00C0FFC0& &H000000FF& MS Sans Serif 12 | 
| Label1 | Caption  ForeColor Height Width Left Top FontName FontSize FontStyle | = &H0000FFFF& 375 375 2040 3480 MS Sans Serif 14 Bold | 
| Label2 | Caption  ForeColor Height Width Left Top FontName FontSize FontStyle | Type 1st Value : &H0000FF00& 495 2295 120 600 MS Sans Serif 12 Bold | 
| Label3 | Caption  ForeColor Height Width Left Top FontName FontSize FontStyle | Type 2nd Value : &H0000FF00& 495 2295 120 1560 MS Sans Serif 12 Bold | 
| Label4 | Caption  ForeColor Height Width Left Top FontName FontSize FontStyle | Tolal : &H0000FF00& 495 1215 120 3480 MS Sans Serif 12 Bold | 
| Label5 | Caption  ForeColor Height Width Left Top FontName FontSize FontStyle | Click Any Button : &H000080FF& 495 1215 120 3480 MS Sans Serif 12 Bold | 
Code:
(General)
  Dim number1 As Integer
  Dim number2 As Integer
  Dim sum As Integer
  Dim subs As Integer
  Dim mult As Integer
  Dim div As Integer
Private Sub cmdAdd_Click()
  number1 = txtNumber1.Text
  number2 = txtNumber2.Text
  sum = number1 + number2
  txtAdd.Text = sum
End Sub
Private Sub cmdMult_Click()
  number1 = txtNumber1.Text
  number2 = txtNumber2.Text
  mult = number1 * number2
  txtAdd.Text = mult
End Sub
Private Sub cmdSubs_Click()
  number1 = txtNumber1.Text
  number2 = txtNumber2.Text
  subs = number1 - number2
  txtAdd.Text = subs
End Sub
Private Sub cmdDivide_Click()
  number1 = txtNumber1.Text
  number2 = txtNumber2.Text
  div = number1 / number2
  txtAdd.Text = div
End Sub
Private Sub cmdClear_Click()
  txtNumber1.Text = ""
  txtNumber2.Text = ""
  txtAdd.Text = ""
End Sub
Private Sub cmdExit_Click()
  End
End Sub
[Note: This calculater can’t calculate more than 5 digits]







 
 
 
 
 
 
0 Comments
Thank you for your Comment.