Bismillah Hirohmannirohim.....
Newbie mau berbagi nih soal Visual Basic 6, sesuai judul di atas ane mau coba buat program sederhana yaitu kalkulator dari vb6,tak usah buanyak omong langsung ja..!!
Buat seperti gambar berikut !!
Propertiesnya !!
SourceCodenya !!
Private Sub cmdbagi_Click()
txthasil.Text = Val(txtnilai1.Text) / Val(txtnilai2.Text)
End Sub
Private Sub cmdhapus_Click()
txthasil.Text = Clear
txtnilai1.Text = Clear
txtnilai2.Text = Clear
End Sub
Private Sub cmdkali_Click()
txthasil.Text = Val(txtnilai1.Text) * Val(txtnilai2.Text)
End Sub
Private Sub cmdkeluar_Click()
End
End Sub
Private Sub cmdkurang_Click()
txthasil.Text = Val(txtnilai1.Text) - Val(txtnilai2.Text)
End Sub
Private Sub cmdtambah_Click()
txthasil.Text = Val(txtnilai1.Text) + Val(txtnilai2.Text)
End Sub
Coba anda Compile, taraaaaaaaaa....suksesssssssss
tutor by www.flyblinkz.tk
Post a Comment