· Deskripsi Form
Latihan 05
Form Latihan_05_36110030
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 Date36110030.Value.Day >= 22 And Date36110030.Value.Month = 12 Or Date36110030.Value.Day <= 18 And Date36110030.Value.Month = 1 Thenbintang36110030.Text = " capricon "
isi36110030.Text = " gak kenapa2 "
Keluar dari Program.
Close()
Event
ButtonclickEvent
Property
Default
Prosedur Penyelesaian latihan 05
A. buka project yang telah dibuat.
B buka Solution explorer.
C. setelah itu klik kanan nama project, pilih add dan klik new item.
D. Setelah add new item terbuka kemudian pilih windows form di windows form ketik nama form dan add
E.kemudian buatlah form seperti desain di bawah ini ;
F. kemudian ganti yang kolom button and text box menjadi
nama saya : nama36110030
tanggal lahir : date36110030
bintang : bintang361100030
kertas isi : isi36110030
close : close36110030
G. kemudian masukan rumus seperti ini :
Public Class Latihan_05_36110030
Private Sub analisa_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles analisa.Click
If Date36110030.Value.Day >= 22 And Date36110030.Value.Month = 12 Or Date36110030.Value.Day <= 18 And Date36110030.Value.Month = 1 Then
bintang36110030.Text = " capricon "
isi36110030.Text = " gak kenapa2 "
ElseIf Date36110030.Value.Day >= 20 And Date36110030.Value.Month = 1 Or Date36110030.Value.Day <= 17 And Date36110030.Value.Month = 2 Then
bintang36110030.Text = " aguarius "
isi36110030.Text = " suka minum air "
ElseIf Date36110030.Value.Day >= 19 And Date36110030.Value.Month = 2 Or Date36110030.Value.Day <= 19 And Date36110030.Value.Month = 3 Then
bintang36110030.Text = " pisces "
isi36110030.Text = " suka marah2 "
ElseIf Date36110030.Value.Day >= 21 And Date36110030.Value.Month = 3 Or Date36110030.Value.Day <= 19 And Date36110030.Value.Month = 4 Then
bintang36110030.Text = " aries "
isi36110030.Text = " doyan nyanyi "
ElseIf Date36110030.Value.Day >= 20 And Date36110030.Value.Month = 4 Or Date36110030.Value.Day <= 20 And Date36110030.Value.Month = 5 Then
bintang36110030.Text = " taurus "
isi36110030.Text = " tak mau di urus "
ElseIf Date36110030.Value.Day >= 21 And Date36110030.Value.Month = 5 Or Date36110030.Value.Day <= 19 And Date36110030.Value.Month = 6 Then
bintang36110030.Text = " gemini "
isi36110030.Text = " maunya lebih "
ElseIf Date36110030.Value.Day >= 21 And Date36110030.Value.Month = 6 Or Date36110030.Value.Day <= 21 And Date36110030.Value.Month = 6 Then
bintang36110030.Text = " cancer "
isi36110030.Text = " adda ajja "
ElseIf Date36110030.Value.Day >= 23 And Date36110030.Value.Month = 7 Or Date36110030.Value.Day <= 21 And Date36110030.Value.Month = 7 Then
bintang36110030.Text = " leo "
isi36110030.Text = " ganteng ku "
ElseIf Date36110030.Value.Day >= 22 And Date36110030.Value.Month = 8 Or Date36110030.Value.Day <= 22 And Date36110030.Value.Month = 8 Then
bintang36110030.Text = " agustus "
isi36110030.Text = " sehat-sehat saja"
ElseIf Date36110030.Value.Day >= 24 And Date36110030.Value.Month = 9 Or Date36110030.Value.Day <= 22 And Date36110030.Value.Month = 9 Then
bintang36110030.Text = " libra "
isi36110030.Text = " kurang kerjaan "
ElseIf Date36110030.Value.Day >= 23 And Date36110030.Value.Month = 10 Or Date36110030.Value.Day <= 20 And Date36110030.Value.Month = 10 Then
bintang36110030.Text = " scorpio "
isi36110030.Text = " kurang makan "
ElseIf Date36110030.Value.Day >= 22 And Date36110030.Value.Month = 11 Or Date36110030.Value.Day <= 20 And Date36110030.Value.Month = 11 Then
bintang36110030.Text = " sagitarius "
isi36110030.Text = " jelekku "
End If
End Sub
End Class
Private Sub analisa_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles analisa.Click
If Date36110030.Value.Day >= 22 And Date36110030.Value.Month = 12 Or Date36110030.Value.Day <= 18 And Date36110030.Value.Month = 1 Then
bintang36110030.Text = " capricon "
isi36110030.Text = " gak kenapa2 "
ElseIf Date36110030.Value.Day >= 20 And Date36110030.Value.Month = 1 Or Date36110030.Value.Day <= 17 And Date36110030.Value.Month = 2 Then
bintang36110030.Text = " aguarius "
isi36110030.Text = " suka minum air "
ElseIf Date36110030.Value.Day >= 19 And Date36110030.Value.Month = 2 Or Date36110030.Value.Day <= 19 And Date36110030.Value.Month = 3 Then
bintang36110030.Text = " pisces "
isi36110030.Text = " suka marah2 "
ElseIf Date36110030.Value.Day >= 21 And Date36110030.Value.Month = 3 Or Date36110030.Value.Day <= 19 And Date36110030.Value.Month = 4 Then
bintang36110030.Text = " aries "
isi36110030.Text = " doyan nyanyi "
ElseIf Date36110030.Value.Day >= 20 And Date36110030.Value.Month = 4 Or Date36110030.Value.Day <= 20 And Date36110030.Value.Month = 5 Then
bintang36110030.Text = " taurus "
isi36110030.Text = " tak mau di urus "
ElseIf Date36110030.Value.Day >= 21 And Date36110030.Value.Month = 5 Or Date36110030.Value.Day <= 19 And Date36110030.Value.Month = 6 Then
bintang36110030.Text = " gemini "
isi36110030.Text = " maunya lebih "
ElseIf Date36110030.Value.Day >= 21 And Date36110030.Value.Month = 6 Or Date36110030.Value.Day <= 21 And Date36110030.Value.Month = 6 Then
bintang36110030.Text = " cancer "
isi36110030.Text = " adda ajja "
ElseIf Date36110030.Value.Day >= 23 And Date36110030.Value.Month = 7 Or Date36110030.Value.Day <= 21 And Date36110030.Value.Month = 7 Then
bintang36110030.Text = " leo "
isi36110030.Text = " ganteng ku "
ElseIf Date36110030.Value.Day >= 22 And Date36110030.Value.Month = 8 Or Date36110030.Value.Day <= 22 And Date36110030.Value.Month = 8 Then
bintang36110030.Text = " agustus "
isi36110030.Text = " sehat-sehat saja"
ElseIf Date36110030.Value.Day >= 24 And Date36110030.Value.Month = 9 Or Date36110030.Value.Day <= 22 And Date36110030.Value.Month = 9 Then
bintang36110030.Text = " libra "
isi36110030.Text = " kurang kerjaan "
ElseIf Date36110030.Value.Day >= 23 And Date36110030.Value.Month = 10 Or Date36110030.Value.Day <= 20 And Date36110030.Value.Month = 10 Then
bintang36110030.Text = " scorpio "
isi36110030.Text = " kurang makan "
ElseIf Date36110030.Value.Day >= 22 And Date36110030.Value.Month = 11 Or Date36110030.Value.Day <= 20 And Date36110030.Value.Month = 11 Then
bintang36110030.Text = " sagitarius "
isi36110030.Text = " jelekku "
End If
End Sub
End Class
H. setelah itu uji program dengan mengklik " star debugging "
I. setelah di uji dan program jalan maka save lah
j. selesai ^_^
0 komentar:
Posting Komentar