Background

background
Private Sub Option1_Click()
Form1.BackColor = vbRed
End Sub

Private Sub Option2_Click()
Form1.BackColor = vbYellow
End Sub

Private Sub Option3_Click()
Form1.BackColor = vbGreen
End Sub

Iklan

Food and Drink

makanan dan minuman
Private Sub Option1_Click()
Label1.Caption = “Bebek Bakar”
End Sub

Private Sub Option2_Click()
Label1.Caption = “Ayam Bakar”
End Sub

Private Sub Option3_Click()
Label1.Caption = “Bubur Ayam”
End Sub

Private Sub Option4_Click()
Label1.Caption = “Bakso”
End Sub

Private Sub Option5_Click()
Label2.Caption = “Jus Alpukat”
End Sub

Private Sub Option6_Click()
Label2.Caption = “Jus Duren”
End Sub

Private Sub Option7_Click()
Label2.Caption = “Jus Mangga”
End Sub

Private Sub Option8_Click()
Label2.Caption = “Air Putih”
End Sub

Color and Style

COLOR AND STYLE
Private Sub Check1_Click()
Label2.FontItalic = Check1.Value
End Sub

Private Sub Check2_Click()
Label2.FontBold = Check2.Value
End Sub

Private Sub Command1_Click()
Label2.Caption = Text1.Text
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Option1_Click()
Label2.ForeColor = vbRed
End Sub

Private Sub Option2_Click()
Label2.ForeColor = vbBlue
End Sub

Latihan 1

Capture

Private Sub Command1_Click()
MsgBox “Nama anda adalah ” + Text1.Text
MsgBox “NPM anda adalah ” + Text2.Text
End Sub

Private Sub Command2_Click()
p = MsgBox(“Anda yakin ingin keluar”, vbQuestion + vbOKCancel, “Informasi”)
If p = vbOK Then
End
End If

End Sub