Minggu, 13 Februari 2011

TUGAS (Visual Basic)

TAHUN DALAM ISLAM


 Coding :
Private Sub Command1_Click()
If Combo1.Text = "januari" Then
Label1.Caption = "muharram dan shafar"
ElseIf Combo1.Text = "februari" Then
Label1.Caption = "shafar dan rabiul al-awwal"
ElseIf Combo1.Text = "maret" Then
Label1.Caption = "rabiul al-awal dan rabiul al-akhir"
ElseIf Combo1.Text = "april" Then
Label1.Caption = "rabiul al-akhir dan jumadil al-awwal"
ElseIf Combo1.Text = "mei" Then
Label1.Caption = "jumadil al-awwal dan jumadil al-akhir"
ElseIf Combo1.Text = "juni" Then
Label1.Caption = "jumadil al-akhir dan rajab"
ElseIf Combo1.Text = "juli" Then
Label1.Caption = "rajab dan sya'ban"
ElseIf Combo1.Text = "agustus" Then
Label1.Caption = "ramadhan dan syawwal"
ElseIf Combo1.Text = "september" Then
Label1.Caption = "syawwal dan dzul-qaidah"
ElseIf Combo1.Text = "oktober" Then
Label1.Caption = "dzul-qaidah dan dzul-hijjah"
ElseIf Combo1.Text = "november" Then
Label1.Caption = "dzul-hijjah dan muharram"
ElseIf Combo1.Text = "desember" Then
Label1.Caption = "muharram dan shafar"
End If
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
 Keterangan :

Label 1 :
                Caption = BULAN DALAM ISLAM
                Font = ARIAL
                Font Style = Black
                Size = 14
Combo Box :
                Caption = BULAN
                Font = MS Sans Serif
                Font Style = Reguler
                Size = 14
Command Button :
                Caption = PROSES
                Font = MS Sans Serif
                Font Style = Reguler
                Size = 18

Label 2 :
                Font = Arial Rounded MT
                Font Style = Bold
                Size = 20


HASIL CODING :




0 komentar:

Posting Komentar