Dim TGl As Date
Dim tglLhr, blnLhr As Integer
Private Sub Command1_Click()
TGl = Me.DTPicker1.Value
tglLhr = Day(TGl)
blnLhr = Month(TGl)
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"
Posted in
Visual Basic
Const phi As Double = 3.14
Dim volumetabung As Double
Private Sub cmdhitung_Click()
luasalas = phi * (txtjarijari.Text * txtjarijari.Text)
volumetabung = luasalas * txttinggi.Text
txtvolume.Text = volumetabung
End Sub
Private Sub cmdkeluar_Click()
Unload Me
End Sub
Posted in
Visual Basic
Private Sub Command1_Click(Index As Integer)
txtnama.Text = "Sigit Purnama"
txtnim.Text = "09.12.4127"
txtkelas.Text = "S1SI-4H"
txtcoment.Text = "Enyonge Lagi Sinau Data Base"
End Sub
Private Sub Command2_Click()
txtnama.Text = ""
txtnim.Text = ""
txtkelas.Text = ""
txtcoment.Text = ""
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub form_load()
cmbojurusan.AddItem "D3-MI"
cmbojurusan.AddItem "D3-TI"
cmbojurusan.AddItem "S1-SI"
cmbojurusan.AddItem "S1-TI"
cmbojurusan.AddItem "S2-TI"
End Sub
Private Sub IsiData()
cmbojurusan = RsNb(0)
End Sub
Posted in
Visual Basic