ASSALAMU'ALAIKUM WARAHMATULLAHI WABAROKATUH :)
SELAMAT DATANG DI BLOG SAYA, SAYA AKAN MEMPOSTING
MENGENAI PROGRAM VISUAL BASIC 10 YANG
SAYA BUAT
PROJECT LATIHAN 6
MENCARI NAMA BULAN DENGAN
INPUTAN ANGKA BULAN
BERIKUT ADALAH CODING CARA MENCARI NILAI UAS, UTS DAN KETERANGAN
Public Class Latihan6
Dim Angkabulan, Jumlahhari As
Integer
Dim Namabulan As String
Sub carinamabulan()
Angkabulan
= Val(Me.Txtangka.Text)
Select Case
(Angkabulan)
Case 1
Namabulan = "Januari"
Jumlahhari = 31
Case 2
Namabulan = "Februari"
Jumlahhari = 28
Case 3
Namabulan = "Maret"
Jumlahhari = 31
Case 4
Namabulan = "April"
Jumlahhari = 30
Case 5
Namabulan = "Mei"
Jumlahhari = 31
Case 6
Namabulan = "Juni"
Jumlahhari = 30
Case 7
Namabulan = "Juli"
Jumlahhari
= 31
Case 8
Namabulan = "Agustus"
Jumlahhari = 30
Case 9
Namabulan = "September"
Jumlahhari = 30
Case 10
Namabulan = "Oktober"
Jumlahhari = 31
Case 11
Namabulan = "Nopember"
Jumlahhari = 30
Case 12
Namabulan = "Desember"
Jumlahhari = 31
Case Else
Namabulan = ""
Jumlahhari = 0
End Select
Me.Lbnamabulan.Text = Namabulan.ToString
Me.Lbjumlahhari.Text = Jumlahhari.ToString
End Sub
Private Sub
Latihan6_FormClosed(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
utama.Enabled = True
utama.Show()
Me.Hide()
End Sub
Private Sub
Latihan6_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
Me.Lbnamabulan.Text = ""
Me.Lbjumlahhari.Text = ""
Me.Txtangka.Text = ""
Me.Txtangka.Focus()
End Sub
Private Sub
Txtangka_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Txtangka.TextChanged
Call carinamabulan()
End Sub
End Class
Tidak ada komentar:
Posting Komentar