Rabu, 26 September 2012

Latihan 05_36110055




PROSEDUR LATIHAN 5 :


Ø  Lanjutan
Ø  Pilih “Add New Item” pada tool
Ø  Lalu pilih “Windows Form” dan ganti nama yang di ingin kan kemudian pilih “Add”
Ø  Muncullah form1.vb (Form1 bisa diganti)
Ø  Mulai bekerja dengan menggunakan tool pada toolbox
Ø  Buat text pada form dengan menggunakan label, antara lain :
a.    “Name”
b.    “Date of Birth”
c.    “Bintang”
Ø  Buat kolom sesuai dengan design pada latihan 4 dengan textbox, kolom sebanyak
a.    Kolom 1 diberi nama “Nama_36001155”
b.    Kolom 2 diberi nama “Bintang_36001155”
c.    Kolom 3 diberi nama “Hasil_36001155”
Ø  Buat tombol Analisa dengan menggunakan button pada textbox
Ø  Buat kolom tanggal dengan menggunakan datetimepicker dan beri nama “BOD_36001155”
Ø  Tampilannya seperti di bawah ini :
 
Ø  Setelah selesai, maka kita masuk pada rumus yaitu :


Public Class Latihan_05_36001155

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If DOB_36001155.Value.Day >= 22 And DOB_36001155.Value.Month = 12 Or DOB_36001155.Value.Day <= 19 And DOB_36001155.Value.Month = 1 Then
            Bintang_36001155.Text = "capricorn"
            Hasil_36001155.Text = "gak kenapa-kenapa"
        ElseIf DOB_36001155.Value.Day >= 20 And DOB_36001155.Value.Month = 1 Or DOB_36001155.Value.Day <= 18 And DOB_36001155.Value.Month = 2 Then
            Bintang_36001155.Text = "aquarius"
            Hasil_36001155.Text = "suka minum air"
        ElseIf DOB_36001155.Value.Day >= 19 And DOB_36001155.Value.Month = 2 Or DOB_36001155.Value.Day <= 20 And DOB_36001155.Value.Month = 3 Then
            Bintang_36001155.Text = "pisces"
            Hasil_36001155.Text = "suka marah-marah"
        ElseIf DOB_36001155.Value.Day >= 21 And DOB_36001155.Value.Month = 3 Or DOB_36001155.Value.Day <= 20 And DOB_36001155.Value.Month = 4 Then
            Bintang_36001155.Text = "aries"
            Hasil_36001155.Text = "doyan nyanyi"
        ElseIf DOB_36001155.Value.Day >= 21 And DOB_36001155.Value.Month = 4 Or DOB_36001155.Value.Day <= 20 And DOB_36001155.Value.Month = 5 Then
            Bintang_36001155.Text = "taurus"
            Hasil_36001155.Text = "mau diurus"
        ElseIf DOB_36001155.Value.Day >= 21 And DOB_36001155.Value.Month = 5 Or DOB_36001155.Value.Day <= 20 And DOB_36001155.Value.Month = 6 Then
            Bintang_36001155.Text = "gemini"
            Hasil_36001155.Text = "maunya lebih"
        ElseIf DOB_36001155.Value.Day >= 21 And DOB_36001155.Value.Month = 6 Or DOB_36001155.Value.Day <= 22 And DOB_36001155.Value.Month = 7 Then
            Bintang_36001155.Text = "cancer"
            Hasil_36001155.Text = "ada ajah"
        ElseIf DOB_36001155.Value.Day >= 23 And DOB_36001155.Value.Month = 7 Or DOB_36001155.Value.Day <= 22 And DOB_36001155.Value.Month = 8 Then
            Bintang_36001155.Text = "leo"
            Hasil_36001155.Text = "suka meraum"
        ElseIf DOB_36001155.Value.Day >= 23 And DOB_36001155.Value.Month = 8 Or DOB_36001155.Value.Day <= 23 And DOB_36001155.Value.Month = 9 Then
            Bintang_36001155.Text = "virgo"
            Hasil_36001155.Text = "sehat-sehat saja"
        ElseIf DOB_36001155.Value.Day >= 23 And DOB_36001155.Value.Month = 9 Or DOB_36001155.Value.Day <= 23 And DOB_36001155.Value.Month = 10 Then
            Bintang_36001155.Text = "libra"
            Hasil_36001155.Text = "kurang kerjaan"
        ElseIf DOB_36001155.Value.Day >= 23 And DOB_36001155.Value.Month = 10 Or DOB_36001155.Value.Day <= 21 And DOB_36001155.Value.Month = 11 Then
            Bintang_36001155.Text = "scorpio"
            Hasil_36001155.Text = "kurang makan"
        ElseIf DOB_36001155.Value.Day >= 22 And DOB_36001155.Value.Month = 11 Or DOB_36001155.Value.Day <= 21 And DOB_36001155.Value.Month = 12 Then
            Bintang_36001155.Text = "sagitarius"
            Hasil_36001155.Text = "cantik deh"
        End If
    End Sub

    Private Sub Close_36001155_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Close_36001155.Click

        Nama_36001155.Text = ""
        Bintang_36001155.Text = ""
        Hasil_36001155.Text = ""
    End Sub
End Class
  

Tidak ada komentar:

Posting Komentar