aqu lagi latian listing program fungsi #operator aritmatika buat tugas matakul #visual basic
ini dia listing nya,buat yang pengen tau,,, trus yang uda jago,makasi bgt klo berkenan mampir disini buat sharing :) cekidot :
Private Sub cmdand_Click()
If txtnilai1 = “true” And txtniali2 = ”true” Then
txthasil = ”true”
ElseIf txtnilai1 = ”true” And txtnilai2 = ”false” Then
txthasil = ”false”
If txtnilai1 = “true” And txtniali2 = ”false” Then
txthasil = ”false”
ElseIf txtnilai1 = ”false” And txtnilai2 = ”true” Then
txthasil = ”false”
Else
txthasil = ”false”
End If
End Sub
Private Sub cmdbagi_Click()
txthasil = Val(txtnilai1.Text) / Val(txtnilai2.Text)
End Sub
Private Sub cmdbelahketupat_Click()
txthasil = Val(txtnilai1.Text) <> Val(txtnilai2.Text)
End Sub
Private Sub cmdkali_Click()
txthasil = Val(txtnilai1.Text) * Val(txtnilai2.Text)
End Sub
Private Sub cmdkeluar_Click()
End
End Sub
Private Sub cmdkurang_Click()
txthasil = Val(txtnilai1.Text) - Val(txtnilai2.Text)
End Sub
Private Sub cmdkurangdari_Click()
txthasil = Val(txtnilai1.Text) < Val(txtnilai2.Text)
End Sub
Private Sub cmdlagi_Click()
txtnilai1 = ""
txtnilai2 = ""
txthasil = ""
txtnot = ""
txtnilai1.SetFocus
End Sub
Private Sub cmdlebihdari_Click()
txthasil = Val(txtnilai1.Text) > Val(txtnilai2.Text)
End Sub
Private Sub cmdmod_Click()
txthasil = Val(txtnilai1.Text) Mod Val(txtnilai2.Text)
End Sub
Private Sub cmdnot_Click()
If cmdnot = True Then
txtnot = Not True
Else
txtnot = Not False
End If
End Sub
Private Sub cmdor_Click()
If txtnilai1 = ”true” Or txtnilai2 = ”true” Then
txthasil = ”true”
If txtnilai1 = ”true” Or txtnilai2 = ”false” Then
txthasil = ”true”
If txtnilai1 = ”false” Or txtnilai2 = ”true” Then
txthasil = ”true”
Else
txthasil = ”false”
End If
End Sub
Private Sub cmdpanahkanan_Click()
txthasil = Val(txtnilai1.Text) >= Val(txtnilai2.Text)
End Sub
Private Sub cmdpanahkiri_Click()
txthasil = Val(txtnilai1.Text) <= Val(txtnilai2.Text)
End Sub
Private Sub cmdsamadengan_Click()
txthasil = Val(txtnilai1.Text) = Val(txtnilai2.Text)
End Sub
Private Sub cmdtambah_Click()
txthasil = Val(txtnilai1.Text) + Val(txtnilai2.Text)
End Sub
ini dia listing nya,buat yang pengen tau,,, trus yang uda jago,makasi bgt klo berkenan mampir disini buat sharing :) cekidot :
Private Sub cmdand_Click()
If txtnilai1 = “true” And txtniali2 = ”true” Then
txthasil = ”true”
ElseIf txtnilai1 = ”true” And txtnilai2 = ”false” Then
txthasil = ”false”
If txtnilai1 = “true” And txtniali2 = ”false” Then
txthasil = ”false”
ElseIf txtnilai1 = ”false” And txtnilai2 = ”true” Then
txthasil = ”false”
Else
txthasil = ”false”
End If
End Sub
Private Sub cmdbagi_Click()
txthasil = Val(txtnilai1.Text) / Val(txtnilai2.Text)
End Sub
Private Sub cmdbelahketupat_Click()
txthasil = Val(txtnilai1.Text) <> Val(txtnilai2.Text)
End Sub
Private Sub cmdkali_Click()
txthasil = Val(txtnilai1.Text) * Val(txtnilai2.Text)
End Sub
Private Sub cmdkeluar_Click()
End
End Sub
Private Sub cmdkurang_Click()
txthasil = Val(txtnilai1.Text) - Val(txtnilai2.Text)
End Sub
Private Sub cmdkurangdari_Click()
txthasil = Val(txtnilai1.Text) < Val(txtnilai2.Text)
End Sub
Private Sub cmdlagi_Click()
txtnilai1 = ""
txtnilai2 = ""
txthasil = ""
txtnot = ""
txtnilai1.SetFocus
End Sub
Private Sub cmdlebihdari_Click()
txthasil = Val(txtnilai1.Text) > Val(txtnilai2.Text)
End Sub
Private Sub cmdmod_Click()
txthasil = Val(txtnilai1.Text) Mod Val(txtnilai2.Text)
End Sub
Private Sub cmdnot_Click()
If cmdnot = True Then
txtnot = Not True
Else
txtnot = Not False
End If
End Sub
Private Sub cmdor_Click()
If txtnilai1 = ”true” Or txtnilai2 = ”true” Then
txthasil = ”true”
If txtnilai1 = ”true” Or txtnilai2 = ”false” Then
txthasil = ”true”
If txtnilai1 = ”false” Or txtnilai2 = ”true” Then
txthasil = ”true”
Else
txthasil = ”false”
End If
End Sub
Private Sub cmdpanahkanan_Click()
txthasil = Val(txtnilai1.Text) >= Val(txtnilai2.Text)
End Sub
Private Sub cmdpanahkiri_Click()
txthasil = Val(txtnilai1.Text) <= Val(txtnilai2.Text)
End Sub
Private Sub cmdsamadengan_Click()
txthasil = Val(txtnilai1.Text) = Val(txtnilai2.Text)
End Sub
Private Sub cmdtambah_Click()
txthasil = Val(txtnilai1.Text) + Val(txtnilai2.Text)
End Sub
wow keren :)
BalasHapustengkyu cantik
BalasHapusMantul mba pud....
BalasHapusLanjutkan..
Mksh Mama abi
BalasHapus