Name frmhitung Form1 Caption ..::Program Keempat::.. StartUpPostion 2 - CenterScreen Name txtnil1 TextBox1 Text Tulisan text1 di hapus Name xtnil2 TextBox2 Text Tulisan text2 di hapus Name txthasil TextBox3 Text Tulisan text3 di hapus Command1 Name cmdtambah Text TAMBAH Command2 Name cmdkurang Caption KURANG Command3 Name cmdkali Caption KALI Command4 Name cmdbagi Caption BAGI Command5 Name cmdkeluar Caption KELUAR
Private Sub cmdbagi_Click()
txthasil.Text = Val(txtnil1.Text) / Val(txtnil2.Text) End Sub Private Sub cmdkali_Click() txthasil.Text = Val(txtnil1.Text) * Val(txtnil2.Text) End Sub
Private Sub cmdkeluar_Click()
End End Sub
Private Sub cmdkurang_Click()
txthasil.Text = Val(txtnil1.Text) - Val(txtnil2.Text) End Sub
Private Sub cmdtambah_Click()
txthasil.Text = Val(txtnil1.Text) + Val(txtnil2.Text) End Sub
Latihan 5. Buat Design Form Sebagai berikut:
Object Propertis Setting
Name frmnilai Form1 Caption ..::Program Kelima::.. StartUpPostion 2 - CenterScreen TextBox1 Name txtnim Text Tulisan text1 di hapus Name txtnama TextBox2 Text Tulisan text2 di hapus Name txtkelas TextBox3 Text Tulisan text3 di hapus TextBox4 Name txtabsen Text Tulisan text3 di hapus TextBox5 Name txttugas Text Tulisan text3 di hapus
TextBox6 Name txtuts
Text Tulisan text3 di hapus TextBox7 Name txtuas Text Tulisan text3 di hapus TextBox8 Name txtrata Text Tulisan text3 di hapus Command1 Name cmdhitung Text HITUNG Command2 Name cmdbersih Caption BERSIH Command3 Name cmdkeluar Caption KELUAR