1. Masuk Visual Basic, lalu pilih standard exe, ganti nama form
2. Buat 4 Label
2. Buat 4 Label
- Label 1 diberi nama Angka Pertama
- Label 2 diberi nama Angka Kedua
- Label 3 diberi Hasil
- Label 4 (Tidak Wajib) diisi dengan kata kalkulator
3. Buatlah 4 button command
Button command 1 diberi nama Tambah
Kodenya :
Dim a,b as integer
A = text 1.text
B = text 2.text
Text3.text = a+b
Button Command 2 diberi nama Kurang
Kodenya :
Dim a,b as integer
A = text1.text
B = text2.text
Text3.text = a-b
Button Command 3 diberi nama Kali
Kodenya :
Dim a,b as integer
A = text1.text
B = text2.text
Text3.text = a*b
Button Command 4 diberi nama Bagi
Kodenya :
Dim a,b as integer
A = text1.text
B = text2.text
Text3.text = a/b
