Membuat Program Zodiak Sederhana Menggunakan VB 06

Membuat Program Zodiak Sederhana Menggunakan VB 06,
Apa kabar agan-agan semua, nih aku sedikit share project aku tiap minggu, bikin program yang inputnya nama, tanggal lahir terus outpunya akan kelihatan apa bintang or zodiaknya.
Programnya sederhana sesuai judulnya(hehe…) cuma nenggunakan percabangan IF dan Else. Namun di bagian penanggalan kita akan menggunakan DTPicker.
Oke langsunga aja ya dari pada kelamaan

Scriptnya kira-kira kaya gini gan

Dim tanggal As Date
Dim tglLhr, blnLhr  As Integer
Dim panggil As String
Private Sub cmdCek_Click()
    tanggal = Me.DTPicker1.Value
    tglLhr = Day(tanggal)
    blnLhr = Month(tanggal)
  
    If (tglLhr >= 22 And blnLhr = 12) Or (tglLhr <= 20 And blnLhr = 1) Then
        zodiak = “Capricorn”
    ElseIf (tglLhr >= 21 And blnLhr = 1) Or (tglLhr <= 19 And blnLhr = 2) Then
        zodiak = “Aquarius”
    ElseIf (tglLhr >= 20 And blnLhr = 2) Or (tglLhr <= 20 And blnLhr = 3) Then
        zodiak = “Pisces”
    ElseIf (tglLhr >= 21 And blnLhr = 3) Or (tglLhr <= 19 And blnLhr = 4) Then
        zodiak = “Aries”
    ElseIf (tglLhr >= 20 And blnLhr = 4) Or (tglLhr <= 20 And blnLhr = 5) Then
        zodiak = “Taurus”
    ElseIf (tglLhr >= 21 And blnLhr = 5) Or (tglLhr <= 21 And blnLhr = 6) Then
        zodiak = “Gemini”
    ElseIf (tglLhr >= 22 And blnLhr = 6) Or (tglLhr <= 22 And blnLhr = 7) Then
        zodiak = “Cancer”
    ElseIf (tglLhr >= 23 And blnLhr = 7) Or (tglLhr <= 23 And blnLhr = 8) Then
        zodiak = “Leo”
    ElseIf (tglLhr >= 24 And blnLhr = 8) Or (tglLhr <= 22 And blnLhr = 9) Then
        zodiak = “Virgo”
    ElseIf (tglLhr >= 23 And blnLhr = 9) Or (tglLhr <= 23 And blnLhr = 10) Then
        zodiak = “Libra”
    ElseIf (tglLhr >= 24 And blnLhr = 10) Or (tglLhr <= 22 And blnLhr = 11) Then
        zodiak = “Scorpio”
    ElseIf (tglLhr >= 23 And blnLhr = 11) Or (tglLhr <= 21 And blnLhr = 12) Then
        zodiak = “Sagitarius”
    End If
    Me.lblZodiak.Caption = zodiak
  
End Sub

Private Sub Form_Load()
End Sub

via 4shared disini
via ziddu disini
Semoga bermanfaat

About arieve techno

My name arieve, i'm from Purworejo..i live in Yogyakarta more aboute me YM/twitter : arieve_techno

Posted on April 19, 2011, in Tutorial. Bookmark the permalink. 1 Comment.

  1. aku wes entuk google adsense. pengen akun google adsense? kirim sms ke aku.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: