
Kamis, 13 September 2012
di
21.19
|
Form Latihan_05_36110037
terdapat empat object yaitu Label, textbox, button, dan DateTime Picker.
Object Label
Object Label
Terdapat tiga label yang
bertuliskan “Name”, “Date of birth”, dan “Bintang”.
Object Textbox
Terdapat tiga textbox
(berstatus input)
yaitu “Name”, “Bintang”, dan “Kertas”.
Object Button
Terdapat dua ubject button
(“Analizing” dan “close”). Button "Analizing" digunakan untuk menampilkan hasil analisa Date Time Picker. Sedangkan button "Close"
digunakan untuk keluar dari program.
Object DateTimePicker
Object DateTimePicker
Terdapat Date Time Picker yang digunakan untuk menampilkan date.
Script Unique
Menganalisa DateTimePicker yang hasilnya akan
ditampilkan pada textbox tertentu.
If Date_36110037.Value.Day >= 22 And Date_36110037.Value.Month = 12
Or Date_36110037.Value.Day <= 19 And Date_36110037.Value.Month = 1
Then Bintang_36110037.Text = "Capricorn"
Kertas_36110037.Text = "Ngak kenapa-kenapa"
Kertas_36110037.Text = "Ngak kenapa-kenapa"
Keluar dari Program.
Close()
Event
ButtonclickEvent
Property
Default
Prosedur Penyelesaian
1. buka project yang telah dibuat.
2. buka Solution explorer.
3. setelah itu klik kanan nama project, pilih add dan klik new item.
4. setelah add new item terbuka, pilih windows form, windoes form, kemudian ketik nama form, dan add.
5. buat form seperti di bawah ini dengan menggunakan toolbox yang saya tunjukkan pada postingan sebelumnya.
6. setelah form selesai, ubah nama textbox dan button menggunakan properties window
7. setelah itu, masuk ke lembar "vb" dengan cara mengklik 2x form dan kemudian ketikkan formula berikut.
Public Class Latihan_05_36110037
Private Sub Latihan_05_36110037_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Close_36110037_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Close_36110037.Click
Close()
End Sub
Private Sub Analizing_36110037_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Analizing_36110037.Click
If Date_36110037.Value.Day >= 22 And Date_36110037.Value.Month = 12 Or Date_36110037.Value.Day <= 19 And Date_36110037.Value.Month = 1 Then
Bintang_36110037.Text = "Capricorn"
Kertas_36110037.Text = "Ngak kenapa-kenapa"
ElseIf Date_36110037.Value.Day >= 20 And Date_36110037.Value.Month = 1 Or Date_36110037.Value.Day <= 18 And Date_36110037.Value.Month = 2 Then
Bintang_36110037.Text = "Aquarius"
Kertas_36110037.Text = "Suka minum air"
ElseIf Date_36110037.Value.Day >= 19 And Date_36110037.Value.Month = 2 Or Date_36110037.Value.Day <= 20 And Date_36110037.Value.Month = 3 Then
Bintang_36110037.Text = "Pisces"
Kertas_36110037.Text = "Suka marah-marah"
ElseIf Date_36110037.Value.Day >= 21 And Date_36110037.Value.Month = 3 Or Date_36110037.Value.Day <= 18 And Date_36110037.Value.Month = 4 Then
Bintang_36110037.Text = "Aries"
Kertas_36110037.Text = "Doyan nyanyi"
ElseIf Date_36110037.Value.Day >= 20 And Date_36110037.Value.Month = 4 Or Date_36110037.Value.Day <= 18 And Date_36110037.Value.Month = 5 Then
Bintang_36110037.Text = "Taurus"
Kertas_36110037.Text = "Tak mau diurus"
ElseIf Date_36110037.Value.Day >= 21 And Date_36110037.Value.Month = 5 Or Date_36110037.Value.Day <= 18 And Date_36110037.Value.Month = 6 Then
Bintang_36110037.Text = "Gemini"
Kertas_36110037.Text = "Maunya lebih"
ElseIf Date_36110037.Value.Day >= 21 And Date_36110037.Value.Month = 6 Or Date_36110037.Value.Day <= 18 And Date_36110037.Value.Month = 7 Then
Bintang_36110037.Text = "Cancer"
Kertas_36110037.Text = "Ada ajah"
ElseIf Date_36110037.Value.Day >= 23 And Date_36110037.Value.Month = 7 Or Date_36110037.Value.Day <= 18 And Date_36110037.Value.Month = 8 Then
Bintang_36110037.Text = "Leo"
Kertas_36110037.Text = "Suka meraung"
ElseIf Date_36110037.Value.Day >= 23 And Date_36110037.Value.Month = 8 Or Date_36110037.Value.Day <= 18 And Date_36110037.Value.Month = 9 Then
Bintang_36110037.Text = "Virgo"
Kertas_36110037.Text = "Sehat-sehat ajah"
ElseIf Date_36110037.Value.Day >= 24 And Date_36110037.Value.Month = 9 Or Date_36110037.Value.Day <= 18 And Date_36110037.Value.Month = 10 Then
Bintang_36110037.Text = "Libra"
Kertas_36110037.Text = "Kurang kerjaan"
ElseIf Date_36110037.Value.Day >= 24 And Date_36110037.Value.Month = 10 Or Date_36110037.Value.Day <= 18 And Date_36110037.Value.Month = 11 Then
Bintang_36110037.Text = "Scorpio"
Kertas_36110037.Text = "Kurang makan"
ElseIf Date_36110037.Value.Day >= 22 And Date_36110037.Value.Month = 11 Or Date_36110037.Value.Day <= 21 And Date_36110037.Value.Month = 12 Then
Bintang_36110037.Text = "Sagitarius"
Kertas_36110037.Text = "Cantik deh"
End If
End Sub
End Class
8. Uji program dengan mengklik "Start Debugging".
9. Save program dengan mengklik icon "save".
10. Selesai.
Diposting oleh
Unknown
0 komentar:
Posting Komentar