sepertinya sih kalkulator (vb 6.0)
Option Explicit
Dim x As String
Dim y As String
Dim z As String
Private Sub Command1_Click()
x = Label1.Caption
Label1.Caption = x & "1"
End Sub
Private Sub Command10_Click()
x = Label1.Caption
Label1.Caption = x & "0"
End Sub
Private Sub Command11_Click()
y = Label1.Caption
z = "+"
Label1.Caption = ""
End Sub
Private Sub Command12_Click()
y = Label1.Caption
z = "-"
Label1.Caption = ""
End Sub
Private Sub Command13_Click()
y = Label1.Caption
z = "X"
Label1.Caption = ""
End Sub
Private Sub Command14_Click()
y = Label1.Caption
z = "/"
Label1.Caption = ""
End Sub
Private Sub Command15_Click()
If z = "-" Then
Label1.Caption = Val(y) - Label1.Caption
ElseIf z = "+" Then
Label1.Caption = Val(y) + Label1.Caption
ElseIf z = "X" Then
Label1.Caption = Val(y) * Label1.Caption
ElseIf z = "/" Then
Label1.Caption = Val(y) / Label1.Caption
End If
End Sub
Private Sub Command2_Click()
x = Label1.Caption
Label1.Caption = x & "2"
End Sub
Private Sub Command3_Click()
x = Label1.Caption
Label1.Caption = x & "3"
End Sub
Private Sub Command4_Click()
x = Label1.Caption
Label1.Caption = x & "4"
End Sub
Private Sub Command5_Click()
x = Label1.Caption
Label1.Caption = x & "5"
End Sub
Private Sub Command6_Click()
x = Label1.Caption
Label1.Caption = x & "6"
End Sub
Private Sub Command7_Click()
x = Label1.Caption
Label1.Caption = x & "7"
End Sub
Private Sub Command8_Click()
x = Label1.Caption
Label1.Caption = x & "8"
End Sub
Private Sub Command9_Click()
x = Label1.Caption
Label1.Caption = x & "9"
End Sub