1.
Cara Menampilkan Form Awal
Komponen toolbox yang digunakan :
Form
|
Komponen
|
Properties
|
Keterangan
|
Form1
|
Form1
|
Name
Text
|
Form1
Mengenal Bentuk dan Warna
|
|
Label1
|
Name
Text
|
Label 1
Belajar Bentuk dan Warna
|
|
Label2
|
Name
Text
|
Label 2
Program Interaktif Belajar Bentuk dan Warna
|
|
Button1
|
Name
Text
|
Button 1
MULAI
|
|
Label3
|
Name
Text
|
Label 3
V 1.0.0.0
|
|
Label4
|
Name
Text
|
Label 4
Tim 23
|
Public Class Form1
Private
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Form2.Show()
Me.Hide()
End Sub
Private
Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
End Sub
Private
Sub OvalShape3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles OvalShape3.Click
Form2.Show()
Me.Hide()
End Sub
Private
Sub OvalShape1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles OvalShape1.Click
End Sub
Private
Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Label5.Click
Form2.Show()
Me.Hide()
End Sub
Private
Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Label1.Click
End Sub
End Class
2.
Cara Menampilkan Form Mengenal Bentuk dan Warna
Komponen toolbox yang digunakan :
Form2
|
Form2
|
Name
Text
|
Form2
Mengenal Bentuk dan Warna
|
|
Label1
|
Name
Text
|
Label 1
Bentuk
|
|
Label2
|
Name
Text
|
Label 2
Warna
|
|
Label3
|
Name
Text
|
Label 1
Lihat Bentuk dan Warna
|
|
Combobox1
|
Name
|
Combobox 1
|
|
Combobox2
|
Name
|
Combobox 2
|
|
Button1
|
Name
Text
|
Button 1
LIHAT!
|
|
Button2
|
Name
Text
|
Button 2
Exit
|
Public Class Form2
Private
Property Response As MsgBoxResult
Private
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
If
ComboBox1.Text = ("Lingkaran") Then Form3.Show()
If
ComboBox1.Text = ("Persegi") Then Form4.Show()
If
ComboBox1.Text = ("Persegi Panjang") Then Form5.Show()
If
ComboBox1.Text = ("") Then MsgBox("Masukkan Bentuk Dan
Warna")
End Sub
Private
Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
End Sub
Private
Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ComboBox1.SelectedIndexChanged
End Sub
End Class
3.
Cara Menampilkan Message Box
Form2
|
Form2
|
Name
Text
|
Form2
Mengenal Bentuk dan Warna
|
|
Button1
|
Name
Text
|
Button 1
LIHAT!
|
Private Sub Button2_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Response = MsgBox("Do you want to Exit?", vbYesNo,
"Exit")
If
Response = vbYes Then
Form1.Close()
Else
'do nothing
End
If
End Sub
0 Response to "ANALISIS PROGRAM MENGENAL BENTUK DAN WARNA"
Posting Komentar