Kamis, 15 November 2012

Analisa Listing Dua Dimensi


LISTING APLIKASI DUA DIMENSI WARNA
Form 1
PublicClassForm1

PrivateSub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
Me.BackColor = Color.HotPink
EndSub

PrivateSub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedText = "PERSEGI"Then Write("PERSEGI")
If ComboBox1.SelectedText = "PERSEGI PANJANG"Then Write("PERSEGI PANJANG")
If ComboBox1.SelectedText = "JAJAR GENJANG"Then Write("JAJAR GENJANG")
If ComboBox1.SelectedText = "SEGITIGA"Then Write("SEGITIGA")
EndSub

PrivateSub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
If ComboBox2.SelectedText = "Merah"Then Write("Merah")
If ComboBox2.SelectedText = "Biru"Then Write("Biru")
If ComboBox2.SelectedText = "Hijau"Then Write("Hijau")
If ComboBox2.SelectedText = "Hitam"Then Write("Hitam")
If ComboBox2.SelectedText = "Kuning"Then Write("Kuning")
EndSub



PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If ComboBox1.Text = "PERSEGI"And ComboBox2.Text = "Merah"ThenForm2.Show()
If ComboBox1.Text = "PERSEGI"And ComboBox2.Text = "Biru"ThenForm3.Show()
If ComboBox1.Text = "PERSEGI"And ComboBox2.Text = "Kuning"ThenForm4.Show()
If ComboBox1.Text = "PERSEGI"And ComboBox2.Text = "Hijau"ThenForm5.Show()
If ComboBox1.Text = "PERSEGI"And ComboBox2.Text = "Hitam"ThenForm6.Show()
If ComboBox1.Text = "PERSEGI PANJANG"And ComboBox2.Text = "Merah"ThenForm7.Show()
If ComboBox1.Text = "PERSEGI PANJANG"And ComboBox2.Text = "Biru"ThenForm8.Show()
If ComboBox1.Text = "PERSEGI PANJANG"And ComboBox2.Text = "Kuning"ThenForm10.Show()
If ComboBox1.Text = "PERSEGI PANJANG"And ComboBox2.Text = "Hijau"ThenForm11.Show()
If ComboBox1.Text = "PERSEGI PANJANG"And ComboBox2.Text = "Hitam"ThenForm12.Show()
If ComboBox1.Text = "JAJAR GENJANG"And ComboBox2.Text = "Merah"ThenForm13.Show()
If ComboBox1.Text = "JAJAR GENJANG"And ComboBox2.Text = "Biru"ThenForm14.Show()
If ComboBox1.Text = "JAJAR GENJANG"And ComboBox2.Text = "Kuning"ThenForm15.Show()
If ComboBox1.Text = "JAJAR GENJANG"And ComboBox2.Text = "Hijau"ThenForm16.Show()
If ComboBox1.Text = "JAJAR GENJANG"And ComboBox2.Text = "Hitam"ThenForm17.Show()
If ComboBox1.Text = "SEGITIGA"And ComboBox2.Text = "Merah"ThenForm18.Show()
If ComboBox1.Text = "SEGITIGA"And ComboBox2.Text = "Biru"ThenForm19.Show()
If ComboBox1.Text = "SEGITIGA"And ComboBox2.Text = "Kuning"ThenForm20.Show()
If ComboBox1.Text = "SEGITIGA"And ComboBox2.Text = "Hijau"ThenForm21.Show()
If ComboBox1.Text = "SEGITIGA"And ComboBox2.Text = "Hitam"ThenForm22.Show()

EndSub

PrivateSub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Hide()
Form26.Show()

EndSub
EndClass









Form 2
PublicClassForm2

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass


Form 3
PublicClassForm3

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass


Form 4
PublicClassForm4

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass


Form 5
PublicClassForm5

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass


Form 6
PublicClassForm6

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass


Form 7
PublicClassForm7

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass


Form 8
PublicClassForm8

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form1.Show()
EndSub
EndClass


Form 9
PublicClassForm9

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form1.Show()
EndSub
EndClass


Form 10
PublicClassForm10

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass


Form 11
PublicClassForm11

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass


Form 12
PublicClassForm12

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass


Form 13
PublicClassForm13

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form 14
PublicClassForm14

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form 15
PublicClassForm15

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass


Form16

PublicClassForm16

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass





Form17

PublicClassForm17

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form18
PublicClassForm18

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form19
PublicClassForm19

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form20
PublicClassForm20

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form21
PublicClassForm21

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form22
PublicClassForm22

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form26
PublicClassForm26

PrivateSub Form26_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
Me.BackColor = Color.Gray
EndSub

PrivateSub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
Me.ForeColor = Color.Red

EndSub
EndClass




Penjelasan listing

Form 1
PublicClassForm1

PrivateSub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
 Me.BackColor = Color.HotPink
·         Memberikan warna pada background
EndSub


PrivateSub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedText = "PERSEGI"Then Write("PERSEGI")
If ComboBox1.SelectedText = "PERSEGI PANJANG"Then Write("PERSEGI PANJANG")
If ComboBox1.SelectedText = "JAJAR GENJANG"Then Write("JAJAR GENJANG")
If ComboBox1.SelectedText = "SEGITIGA"Then Write("SEGITIGA")
EndSub

PrivateSub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
If ComboBox2.SelectedText = "Merah"Then Write("Merah")
If ComboBox2.SelectedText = "Biru"Then Write("Biru")
If ComboBox2.SelectedText = "Hijau"Then Write("Hijau")
If ComboBox2.SelectedText = "Hitam"Then Write("Hitam")
If ComboBox2.SelectedText = "Kuning"Then Write("Kuning")
·         Menerangkan ,contohnyajikakitamemilihpersegimakaakantertulispersegi. Lalujikamemilihmerahmakaakantertulismerah.
·          
EndSub

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If ComboBox1.Text = "PERSEGI"And ComboBox2.Text = "Merah"ThenForm2.Show()
If ComboBox1.Text = "PERSEGI"And ComboBox2.Text = "Biru"ThenForm3.Show()
If ComboBox1.Text = "PERSEGI"And ComboBox2.Text = "Kuning"ThenForm4.Show()
If ComboBox1.Text = "PERSEGI"And ComboBox2.Text = "Hijau"ThenForm5.Show()
If ComboBox1.Text = "PERSEGI"And ComboBox2.Text = "Hitam"ThenForm6.Show()
If ComboBox1.Text = "PERSEGI PANJANG"And ComboBox2.Text = "Merah"ThenForm7.Show()
If ComboBox1.Text = "PERSEGI PANJANG"And ComboBox2.Text = "Biru"ThenForm8.Show()
If ComboBox1.Text = "PERSEGI PANJANG"And ComboBox2.Text = "Kuning"ThenForm10.Show()
If ComboBox1.Text = "PERSEGI PANJANG"And ComboBox2.Text = "Hijau"ThenForm11.Show()
If ComboBox1.Text = "PERSEGI PANJANG"And ComboBox2.Text = "Hitam"ThenForm12.Show()
If ComboBox1.Text = "JAJAR GENJANG"And ComboBox2.Text = "Merah"ThenForm13.Show()
If ComboBox1.Text = "JAJAR GENJANG"And ComboBox2.Text = "Biru"ThenForm14.Show()
If ComboBox1.Text = "JAJAR GENJANG"And ComboBox2.Text = "Kuning"ThenForm15.Show()
If ComboBox1.Text = "JAJAR GENJANG"And ComboBox2.Text = "Hijau"ThenForm16.Show()
If ComboBox1.Text = "JAJAR GENJANG"And ComboBox2.Text = "Hitam"ThenForm17.Show()
If ComboBox1.Text = "SEGITIGA"And ComboBox2.Text = "Merah"ThenForm18.Show()
If ComboBox1.Text = "SEGITIGA"And ComboBox2.Text = "Biru"ThenForm19.Show()
If ComboBox1.Text = "SEGITIGA"And ComboBox2.Text = "Kuning"ThenForm20.Show()
If ComboBox1.Text = "SEGITIGA"And ComboBox2.Text = "Hijau"ThenForm21.Show()
If ComboBox1.Text = "SEGITIGA"And ComboBox2.Text = "Hitam"ThenForm22.Show()

·         Jad iJika pada ComboBox1 dipilih segitiga dan ComboBox2 dipilih  hitam  maka akan muncul bangun segitiga warna hitam dimana form yang muncul tersebut merupakan form 22. Sebagaimana yang diperintahkan dalam listingnya.







EndSub

PrivateSub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Me.Hide()
·         Menghilangkan form yang sedang dibuka
Form26.Show()
·         Memunculkan form26
EndSub
EndClass




Form 2
PublicClassForm2

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass

Form 3
PublicClassForm3

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass
·         Untuk form 2 – 26 karena bentuknya sama, maka fungsi listingnya juga sama


Form 4
PublicClassForm4

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass
Form 5
PublicClassForm5

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass

Form 6
PublicClassForm6

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass

Form 7
PublicClassForm7

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClasForm 8
PublicClassForm8

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form1.Show()
EndSub
EndClass

Form 9
PublicClassForm9

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form1.Show()
EndSub
EndClass


Form 10
PublicClassForm10

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass


Form 11
PublicClassForm11

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass

Form 12
PublicClassForm12

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
EndSub
EndClass

Form 13
PublicClassForm13

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form 14
PublicClassForm14

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form 15
PublicClassForm15

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass




Form16

PublicClassForm16

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form17

PublicClassForm17

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form18
PublicClassForm18

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form19
PublicClassForm19

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form20
PublicClassForm20

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass


Form21
PublicClassForm21

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form22
PublicClassForm22

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()

EndSub
EndClass

Form26
PublicClassForm26

PrivateSub Form26_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
Me.BackColor = Color.Gray
EndSub

PrivateSub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
Me.ForeColor = Color.Red

EndSub
EndClass

Tidak ada komentar:

Posting Komentar