mambuat aplikasi kalender hijriah dengan vb 6.0


1. buka form seperti di bawah ini:

ganti pada propertinya:
caption : hijriah
backcolor : black

2. tambahkan label seperti dibawah ini:

ubah propertinya:
name : label2
caption : bulan di tahun hijriah
3.
buat combobox seperti diatas tanpa di ubah-ubah propertinya
4.
buat 1 command button dan ubah propertinya:
caption : proses
5.
tambahkan label lagi dan ubah propertinya:
name : label1
6.
tambahkan timer tanpa di ubah ubah propertinya
7.
tambahkan 12 image dan ubah propertinya
image1: name : jan
image2: name : feb
image3: name : mar
image4: name : apr
image5: name : mei
image6: name : jun
image7: name : jul
image8: name : imag
image9: name : img
image10: name : okt
image11: name : nov
image12: name : des

selesai sudah pendesainannya

sekarang mulailah cooding…………:

Private Sub Command1_Click()
Timer2.Interval = 1
If Combo1.Text = “januari” Then
jan.Visible = True
feb.Visible = 0
mar.Visible = 0
apr.Visible = 0
mei.Visible = 0
jun.Visible = 0
jul.Visible = 0
Imag.Visible = 0
Img.Visible = 0
okt.Visible = 0
nov.Visible = 0
des.Visible = 0
ElseIf Combo1.Text = “februari” Then
jan.Visible = 0
feb.Visible = True
mar.Visible = 0
apr.Visible = 0
mei.Visible = 0
jun.Visible = 0
jul.Visible = 0
Imag.Visible = 0
Img.Visible = 0
okt.Visible = 0
nov.Visible = 0
des.Visible = 0
ElseIf Combo1.Text = “maret” Then
jan.Visible = 0
feb.Visible = 0
mar.Visible = 1
apr.Visible = 0
mei.Visible = 0
jun.Visible = 0
jul.Visible = 0
Imag.Visible = 0
Img.Visible = 0
okt.Visible = 0
nov.Visible = 0
des.Visible = 0
ElseIf Combo1.Text = “april” Then
jan.Visible = 0
feb.Visible = 0
mar.Visible = 0
apr.Visible = 1
mei.Visible = 0
jun.Visible = 0
jul.Visible = 0
Imag.Visible = 0
Img.Visible = 0
okt.Visible = 0
nov.Visible = 0
des.Visible = 0
ElseIf Combo1.Text = “mei” Then
jan.Visible = 0
feb.Visible = 0
mar.Visible = 0
apr.Visible = 0
mei.Visible = 1
jun.Visible = 0
jul.Visible = 0
Imag.Visible = 0
Img.Visible = 0
okt.Visible = 0
nov.Visible = 0
des.Visible = 0
ElseIf Combo1.Text = “juni” Then
jan.Visible = 0
feb.Visible = 0
mar.Visible = 0
apr.Visible = 0
mei.Visible = 0
jun.Visible = 1
jul.Visible = 0
Imag.Visible = 0
Img.Visible = 0
okt.Visible = 0
nov.Visible = 0
des.Visible = 0
ElseIf Combo1.Text = “juli” Then
jan.Visible = 0
feb.Visible = 0
mar.Visible = 0
apr.Visible = 0
mei.Visible = 0
jun.Visible = 0
jul.Visible = 1
Imag.Visible = 0
Img.Visible = 0
okt.Visible = 0
nov.Visible = 0
des.Visible = 0
ElseIf Combo1.Text = “agustus” Then
jan.Visible = 0
feb.Visible = 0
mar.Visible = 0
apr.Visible = 0
mei.Visible = 0
jun.Visible = 0
jul.Visible = 0
Imag.Visible = 1
Img.Visible = 0
okt.Visible = 0
nov.Visible = 0
des.Visible = 0
ElseIf Combo1.Text = “september” Then
jan.Visible = 0
feb.Visible = 0
mar.Visible = 0
apr.Visible = 0
mei.Visible = 0
jun.Visible = 0
jul.Visible = 0
Imag.Visible = 0
Img.Visible = 1
okt.Visible = 0
nov.Visible = 0
des.Visible = 0
ElseIf Combo1.Text = “oktober” Then
jan.Visible = 0
feb.Visible = 0
mar.Visible = 0
apr.Visible = 0
mei.Visible = 0
jun.Visible = 0
jul.Visible = 0
Imag.Visible = 0
Img.Visible = 0
okt.Visible = 1
nov.Visible = 0
des.Visible = 0
ElseIf Combo1.Text = “november” Then
jan.Visible = 0
feb.Visible = 0
mar.Visible = 0
apr.Visible = 0
mei.Visible = 0
jun.Visible = 0
jul.Visible = 0
Imag.Visible = 0
Img.Visible = 0
okt.Visible = 0
nov.Visible = 1
des.Visible = 0
ElseIf Combo1.Text = “desember” Then
jan.Visible = 0
feb.Visible = 0
mar.Visible = 0
apr.Visible = 0
mei.Visible = 0
jun.Visible = 0
jul.Visible = 0
Imag.Visible = 0
Img.Visible = 0
okt.Visible = 0
nov.Visible = 0
des.Visible = 1
End If
Dim bulan As String
Dim hasil As String
bulan = Combo1.Text
Select Case bulan
Case “januari”
hasil = “muharram dan shafar”
Case “februari”
hasil = “shafar dan rabiul al-awwal”
Case “maret”
hasil = “rabiul al-awal dan rabiul al-akhir”
Case “april”
hasil = “rabiul al-akhir dan jumadil al-awwal”
Case “mei”
hasil = “jumadil al-awwal dan jumadil al-akhir”
Case “juni”
hasil = “jumadil al-akhir dan rajab”
Case “juli”
hasil = “rajab dan sya’ban”
Case “agustus”
hasil = “ramadhan dan syawwal”
Case “september”
hasil = “syawwal dan dzul-qaidah”
Case “oktober”
hasil = “dzul-qaidah dan dzul-hijjah”
Case “november”
hasil = “dzul-hijjah dan muharram”
Case “desember”
hasil = “muharram dan shafar”
End Select
Label1.Caption = hasil
End Sub

Private Sub Form_Load()
Combo1.AddItem “januari”
Combo1.AddItem “februari”
Combo1.AddItem “maret”
Combo1.AddItem “april”
Combo1.AddItem “mei”
Combo1.AddItem “juni”
Combo1.AddItem “juli”
Combo1.AddItem “agustus”
Combo1.AddItem “september”
Combo1.AddItem “oktober”
Combo1.AddItem “november”
Combo1.AddItem “desember”
End Sub

Private Sub Timer2_Timer()
If Combo1.Text = “januari” Then
Label1.Left = Label1.Left – 15
If Label1.Left < -5000 Then
Label1.Left = 7000
End If
ElseIf Combo1.Text = "februari" Then
Label1.Left = Label1.Left – 15
If Label1.Left < -5000 Then
Label1.Left = 7000
End If
ElseIf Combo1.Text = "maret" Then
Label1.Left = Label1.Left – 15
If Label1.Left < -5000 Then
Label1.Left = 7000
End If
ElseIf Combo1.Text = "april" Then
Label1.Left = Label1.Left – 15
If Label1.Left < -5000 Then
Label1.Left = 7000
End If
ElseIf Combo1.Text = "mei" Then
Label1.Left = Label1.Left – 15
If Label1.Left < -5000 Then
Label1.Left = 7000
End If
ElseIf Combo1.Text = "juni" Then
Label1.Left = Label1.Left – 15
If Label1.Left < -5000 Then
Label1.Left = 7000
End If
ElseIf Combo1.Text = "juli" Then
Label1.Left = Label1.Left – 15
If Label1.Left < -5000 Then
Label1.Left = 7000
End If
ElseIf Combo1.Text = "agustus" Then
Label1.Left = Label1.Left – 15
If Label1.Left < -5000 Then
Label1.Left = 7000
End If
ElseIf Combo1.Text = "september" Then
Label1.Left = Label1.Left – 15
If Label1.Left < -5000 Then
Label1.Left = 7000
End If
ElseIf Combo1.Text = "oktober" Then
Label1.Left = Label1.Left – 15
If Label1.Left < -5000 Then
Label1.Left = 7000
End If
ElseIf Combo1.Text = "november" Then
Label1.Left = Label1.Left – 15
If Label1.Left < -5000 Then
Label1.Left = 7000
End If
ElseIf Combo1.Text = "desember" Then
Label1.Left = Label1.Left – 15
If Label1.Left < -5000 Then
Label1.Left = 7000
End If
End If
End Sub

selesai sudah pembuatan aplikasinya………..
selamat mencoba dan semoga berhasil………….!!!!!!!!!!

not with me

Posted in visual basic

anam46

artikel terkini
arsipan
category
kalender
February 2011
S M T W T F S
« Jan   Mar »
 12345
6789101112
13141516171819
20212223242526
2728  
%d bloggers like this: