keterangan yang kudu di tulis di name propertis
1. layar text box nya = Text1
2. On = cmdhapus
3. C = cmdhapus
4. Off = cmdkeluar
5. angka 0 - 9 = cmdangka
6. tanda titik ( . ) = cmdangka
7. tanda tambah ( + ) = cmdoperator
8. tanda kurang ( - ) = cmdoperator
9. tanda kali ( * ) = cmdoperator
10. tanda bagi ( / ) = cmdoperator
11.tanda sama dengan ( = ) = cmd hitung
nihh koding nye
Dim angka(1 To 2) As Single
Dim operator As String
_________________________________
Private Sub cmdangka_Click(Index As Integer)
Text1.Text = Text1.Text & cmdangka(Index).Caption
End Sub
_________________________________
Private Sub cmdhapus_Click(Index As Integer)
Text1.Text = ""
End Sub
_________________________________
Private Sub cmdhitung_Click()
Dim hasil As Single
If Text1.Text = "" Then Exit Sub
angka(2) = CSng(Text1.Text)
Select Case operator
Case "+"
hasil = angka(1) + angka(2)
Case "-"
hasil = angka(1) - angka(2)
Case "*"
hasil = angka(1) * angka(2)
Case "/"
hasil = angka(1) / angka(2)
End Select
Text1.Text = hasil
End Sub
_________________________________
Private Sub cmdkeluar_Click()
Unload Me
End Sub
_________________________________
Private Sub cmdoperator_Click(Index As Integer)
If Text1.Text = "" Then Exit Sub
angka(1) = CSng(Text1.Text)
operator = cmdoperator(Index).Caption
Text1.Text = ""
End Sub
_________________________________
Private Sub Text1_Change()
End Sub
muga2 bermanfaat ye,,,