Tahun Lahir Anda name = tl
Tahun Sekarang name = ts
Umur dalam tahun name = ut
Umur dalam detik = ud
Keterangan name = k
nih koding nya...
Private Sub aktif_Click()
tl.Enabled = True
ts.Enabled = True
ut.Enabled = True
ud.Enabled = True
k.Enabled = True
aktif.Enabled = False
batal.Enabled = True
keluar.Enabled = True
End Sub
Private Sub batal_Click()
tl.Text = ""
ts.Text = ""
ut.Text = ""
ud.Text = ""
k.Text = ""
End Sub
Private Sub Form_Load()
tl.Enabled = False
ts.Enabled = False
ut.Enabled = False
ud.Enabled = False
k.Enabled = False
aktif.Enabled = True
batal.Enabled = False
keluar.Enabled = False
tl.Text = ""
ts.Text = ""
ut.Text = ""
ud.Text = ""
k.Text = ""
End Sub
Private Sub k_GotFocus()
If Val(tl.Text) Mod 4 = 0 Or Val(tl.Text) Mod 400 = 0 And Val(tl.Text) Mod 100 <> 0 Then
k.Text = "Tahun Kabisat"
Else
k.Text = "Bukan Tahun Kabisat"
End If
End Sub
Private Sub keluar_Click()
End
End Sub
Private Sub ud_GotFocus()
ud.Text = 31536000 * Val(ut.Text)
End Sub
Private Sub ut_GotFocus()
ut.Text = Val(ts.Text) - Val(tl.Text)
End Sub
tl.Enabled = True
ts.Enabled = True
ut.Enabled = True
ud.Enabled = True
k.Enabled = True
aktif.Enabled = False
batal.Enabled = True
keluar.Enabled = True
End Sub
Private Sub batal_Click()
tl.Text = ""
ts.Text = ""
ut.Text = ""
ud.Text = ""
k.Text = ""
End Sub
Private Sub Form_Load()
tl.Enabled = False
ts.Enabled = False
ut.Enabled = False
ud.Enabled = False
k.Enabled = False
aktif.Enabled = True
batal.Enabled = False
keluar.Enabled = False
tl.Text = ""
ts.Text = ""
ut.Text = ""
ud.Text = ""
k.Text = ""
End Sub
Private Sub k_GotFocus()
If Val(tl.Text) Mod 4 = 0 Or Val(tl.Text) Mod 400 = 0 And Val(tl.Text) Mod 100 <> 0 Then
k.Text = "Tahun Kabisat"
Else
k.Text = "Bukan Tahun Kabisat"
End If
End Sub
Private Sub keluar_Click()
End
End Sub
Private Sub ud_GotFocus()
ud.Text = 31536000 * Val(ut.Text)
End Sub
Private Sub ut_GotFocus()
ut.Text = Val(ts.Text) - Val(tl.Text)
End Sub
0 komentar:
Posting Komentar