Kamis, 02 Maret 2017

Tugas visual studio membuat zodiak

Public Class Form1


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If ((TextBox1.Text >= 22 And TextBox2.Text = 12) Or (TextBox1.Text <= 20 And TextBox2.Text = 1)) Then
            TextBox3.Text = "Capricorn"
            TextBox4.Text = "Berhati-hati terhadap air"
        ElseIf ((TextBox1.Text >= 21 And TextBox2.Text = 1) Or (TextBox1.Text <= 19 And TextBox2.Text = 2)) Then
            TextBox3.Text = "Aquarius"
            TextBox4.Text = "Anda Akan segera Menemukan Jodoh"
        ElseIf ((TextBox1.Text >= 20 And TextBox2.Text = 2) Or (TextBox1.Text <= 20 And TextBox2.Text = 3)) Then
            TextBox3.Text = "Pices"
            TextBox4.Text = "Bulan yang cocok untuk Bisnis"
        ElseIf ((TextBox1.Text >= 21 And TextBox2.Text = 3) Or (TextBox1.Text <= 20 And TextBox2.Text = 4)) Then
            TextBox3.Text = "Aries"
            TextBox4.Text = "Jauhi benda tajam"
        ElseIf ((TextBox1.Text >= 21 And TextBox2.Text = 4) Or (TextBox1.Text <= 20 And TextBox2.Text = 5)) Then
            TextBox3.Text = "Taurus"
            TextBox4.Text = "Jagalah keshatan"
        ElseIf ((TextBox1.Text >= 21 And TextBox2.Text = 5) Or (TextBox1.Text <= 21 And TextBox2.Text = 6)) Then
            TextBox3.Text = "Gemini"
            TextBox4.Text = "Kurangi makanan berlemak"
        ElseIf ((TextBox1.Text >= 22 And TextBox2.Text = 6) Or (TextBox1.Text <= 22 And TextBox2.Text = 7)) Then
            TextBox3.Text = "Cancer"
            TextBox4.Text = "Hindai ajakan pergi bertiga"
        ElseIf ((TextBox1.Text >= 23 And TextBox2.Text = 7) Or (TextBox1.Text <= 23 And TextBox2.Text = 8)) Then
            TextBox3.Text = "Leo"
            TextBox4.Text = "Guanakan sesuatu yang merah"
        ElseIf ((TextBox1.Text >= 24 And TextBox2.Text = 8) Or (TextBox1.Text <= 22 And TextBox2.Text = 9)) Then
            TextBox3.Text = "Virgo"
            TextBox4.Text = "Hindari yang berwarna hijau"
        ElseIf ((TextBox1.Text >= 23 And TextBox2.Text = 9) Or (TextBox1.Text <= 23 And TextBox2.Text = 10)) Then
            TextBox3.Text = "Libra"
            TextBox4.Text = "Keuangan lancar"
        ElseIf ((TextBox1.Text >= 24 And TextBox2.Text = 10) Or (TextBox1.Text <= 22 And TextBox2.Text = 11)) Then
            TextBox3.Text = "Scorpio"
            TextBox4.Text = "Lakukan olahraga sesekali"
        ElseIf ((TextBox1.Text >= 23 And TextBox2.Text = 11) Or (TextBox1.Text <= 21 And TextBox2.Text = 12)) Then
            TextBox3.Text = "Sagitarius"
            TextBox4.Text = "Kurangi mendengar lagu"
        Else : MsgBox("Anda Salah Masuk Data")
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        End
    End Sub
End Class