Buat Kalkulator Tambah, Kurang, Kali Bagi dengan Visual basic 6.0
Posted in category
Label:
buat kalkulator dengan visual basic 6.0,
how to make kalkulator with visual basic 6.0,
visual basic 6.0
Nah Kali yg Kemaren ane kasih tau gimana buat Kalkulator lengkap seperti kalkulator Windows. Nah kali nih ane Hanya share cara buat kalkulator Tambah, Kurang, Bagi, Kali. Oke langsung aja ke TKP, Cekidott.. .
Jamu-jamu :
- Buka visual basic 6.0. dan Pilih Standar EXE
- Sediakan, 3 textbox, 4 command button
Langkah :
- Taruk 3 buah buah Textbox di Form, dan Desain sesuka hati
- dan Taruk juga 4 Command Button di Form dan desain sesuka hati
- Jika Sudah, Copy Paste Code berikut di Form
Private Sub Command1_Click()
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
End Sub
Private Sub Command2_Click()
Text3.Text = Val(Text1.Text) - Val(Text2.Text)
End Sub
Private Sub Command3_Click()
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End Sub
Private Sub Command4_Click()
Text3.Text = Val(Text1.Text) / Val(Text2.Text)
End Sub
Private Sub Command5_Click()
Text1.Text = Clear
Text2.Text = Clear
Text3.Text = Clear
End Sub
Private Sub Form_Load()
Command1.Caption = "Tambah"
Command2.Caption = "Kurang"
Command3.Caption = "Kali"
Command4.Caption = "Bagi"
Command5.Caption = "Clear"
Text3.Text = "Hasil"
End Sub
Jika Kurang Jelas. Dapat Download Project-nya Disini
Unknown Says:
11 Februari 2019 pukul 15.25
Thanks kak :)