VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This program tells you the weekday of your birth, for ex: put 20/7/2002 and it tells you that this

by sherif rofael (15 Submissions)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 22nd July 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This program tells you the weekday of your birth, for ex: put 20/7/2002 and it tells you that this day is saturday, also it calculates your

API Declarations


'enjoy


Rate This program tells you the weekday of your birth, for ex: put 20/7/2002 and it tells you that this



Dim p As Integer
Private Sub Command1_Click()
p = 0
qq.Visible = False
'If m1 > 12 Or d1 > 31 Then vv.Visible = True: vv.Caption = "month must be less than 12 and day must be less than 31": Exit Sub
Timer1.Interval = 100
End Sub

Private Sub Command2_Click()
p = p + 1
Timer1.Interval = 0
Label1.Caption = ""
Label2.Caption = ""
Label3.Caption = ""
Label4.Caption = ""
Label5.Caption = ""
Label6.Caption = ""
Label7.Caption = ""
If p = 1 Then Command2.Caption = "press again"
If p = 2 Then ff = "": Command2.Visible = False: Command2.Caption = "i wanna enter another date": qq.Visible = True
End Sub

Private Sub Form_Load()
qq.Visible = False
End Sub

Private Sub Image1_Click()
End
End Sub

Private Sub Image2_Click()
Label17.Visible = True
End Sub

Private Sub Timer1_Timer()
m = Weekday(ff)
Select Case m
Case 1
fday = "sunday"
Case 2
fday = "monday"
Case 3
fday = "tuesday"
Case 4
fday = "wednesday"
Case 5
fday = "thursday"
Case 6
fday = "friday"
Case 7
fday = "saturday"
End Select
'Print fday
d1 = Day(ff)
m1 = Month(ff)
Y1 = Year(ff)
d2 = Day(Date)
m2 = Month(Date)
Y2 = Year(Date)
'Print d1, m1, Y1
'Print d2, m2, Y2
Label15.Visible = True
vv.Visible = False
If Y1 > Y2 Then vv.Visible = True: vv.Caption = "please enter a date older than today's date": Timer1.Interval = 0: Label15.Visible = False: Exit Sub
If d2 < d1 Then m2 = m2 - 1: d2 = d2 + 30
If m2 < m1 Then Y2 = Y2 - 1: m2 = 12 + m2
d = Abs(d2 - d1)
m = Abs(m2 - m1)
y = Abs(Y2 - Y1)
Label1.Caption = y
Label2.Caption = m
Label3.Caption = d
sec = Second(Time)
Min = Minute(Time)
ho = Hour(Time)
Label4.Caption = ho
Label5.Caption = Min
Label6.Caption = sec
Label7.Caption = fday
Command2.Visible = True
End Sub

Private Sub Timer2_Timer()
Randomize Timer
t1 = Int(255 * Rnd)
t2 = Int(255 * Rnd)
t3 = Int(255 * Rnd)

ff.BackColor = RGB(t1, t2, t3)
'ff.BackColor = QBColor(t)
End Sub
' by : sherif rofael.
' mailto : [email protected]
' website:
' http://sherif1.netfirms.com
' http://vbsherif.members.easyspace.com  (to download the programs)
' u can download the program
' http://sherif1.netfirms.com/encoder1.2.zip (whole project)

Download this snippet    Add to My Saved Code

This program tells you the weekday of your birth, for ex: put 20/7/2002 and it tells you that this Comments

No comments have been posted about This program tells you the weekday of your birth, for ex: put 20/7/2002 and it tells you that this . Why not be the first to post a comment about This program tells you the weekday of your birth, for ex: put 20/7/2002 and it tells you that this .

Post your comment

Subject:
Message:
0/1000 characters