Selasa, 05 April 2011
Pembuatan Kalkulator
Listing Program
Private Sub cmdbagi_Click()
Me.txthasil.Text = Val(Me.txtn1.Text) / Val(Me.txtn2.Text)
End Sub
Private Sub cmdBersih_Click()
Me.txtn1.Text = ""
Me.txtn2.Text = ""
Me.txthasil.Text = ""
End Sub
Private Sub cmdkali_Click()
Me.txthasil.Text = Val(Me.txtn1.Text) * Val(Me.txtn2.Text)
End Sub
Private Sub cmdkeluar_Click()
End
End Sub
Private Sub cmdkurang_Click()
Me.txthasil.Text = Val(Me.txtn1.Text) - Val(Me.txtn2.Text)
End Sub
Private Sub cmdpangkat_Click()
Me.txthasil.Text = Val(Me.txtn1.Text) ^ Val(Me.txtn2.Text)
End Sub
Private Sub cmdtambah_Click()
Me.txthasil.Text = Val(Me.txtn1.Text) + Val(Me.txtn2.Text)
End Sub
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar