home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form calform
- BackColor = &H00000040&
- Caption = "calender program"
- ClientHeight = 5700
- ClientLeft = 450
- ClientTop = 1335
- ClientWidth = 7425
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 13.5
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 6105
- Left = 390
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- ScaleHeight = 5700
- ScaleWidth = 7425
- Top = 990
- Width = 7545
- Begin Timer Timer1
- Enabled = 0 'False
- Interval = 1
- Left = 6240
- Top = 5280
- End
- Begin CommandButton Command2
- Caption = "A&bout"
- Height = 495
- Left = 5280
- TabIndex = 59
- Top = 5160
- Width = 735
- End
- Begin TextBox YearEntered
- Height = 375
- Left = 1680
- TabIndex = 6
- Top = 5160
- Width = 1215
- End
- Begin CommandButton Command1
- Caption = "&December"
- Height = 375
- Index = 11
- Left = 6120
- TabIndex = 17
- Top = 4680
- Width = 1095
- End
- Begin CommandButton Command1
- Caption = "&November"
- Height = 375
- Index = 10
- Left = 4920
- TabIndex = 16
- Top = 4680
- Width = 1095
- End
- Begin CommandButton Command1
- Caption = "&October"
- Height = 375
- Index = 9
- Left = 3720
- TabIndex = 15
- Top = 4680
- Width = 1095
- End
- Begin CommandButton Command1
- Caption = "&September"
- Height = 375
- Index = 8
- Left = 2520
- TabIndex = 14
- Top = 4680
- Width = 1095
- End
- Begin CommandButton Command1
- Caption = "Augus&t"
- Height = 375
- Index = 7
- Left = 1320
- TabIndex = 13
- Top = 4680
- Width = 1095
- End
- Begin CommandButton Command1
- Caption = "Jul&y"
- Height = 375
- Index = 6
- Left = 120
- TabIndex = 12
- Top = 4680
- Width = 1095
- End
- Begin CommandButton Command1
- Caption = "Jun&e"
- Height = 375
- Index = 5
- Left = 6120
- TabIndex = 11
- Top = 4200
- Width = 1095
- End
- Begin CommandButton Command1
- Caption = "Ma&y"
- Height = 375
- Index = 4
- Left = 4920
- TabIndex = 10
- Top = 4200
- Width = 1095
- End
- Begin CommandButton Command1
- Caption = "&April"
- Height = 375
- Index = 3
- Left = 3720
- TabIndex = 9
- Top = 4200
- Width = 1095
- End
- Begin CommandButton Command1
- Caption = "&March"
- Height = 375
- Index = 2
- Left = 2520
- TabIndex = 8
- Top = 4200
- Width = 1095
- End
- Begin CommandButton Command1
- Caption = "&February"
- Height = 375
- Index = 1
- Left = 1320
- TabIndex = 4
- Top = 4200
- Width = 1095
- End
- Begin CommandButton Command1
- Caption = "&January"
- Height = 375
- Index = 0
- Left = 120
- TabIndex = 3
- Top = 4200
- Width = 1095
- End
- Begin Frame Frame1
- BackColor = &H0080FFFF&
- Height = 3975
- Left = 240
- TabIndex = 0
- Top = 120
- Width = 6015
- Begin Label Label1
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 41
- Left = 5160
- TabIndex = 58
- Top = 3360
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 40
- Left = 4320
- TabIndex = 57
- Top = 3360
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 39
- Left = 3360
- TabIndex = 56
- Top = 3360
- Width = 975
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 38
- Left = 2400
- TabIndex = 55
- Top = 3360
- Width = 975
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 37
- Left = 1560
- TabIndex = 54
- Top = 3360
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 36
- Left = 720
- TabIndex = 53
- Top = 3360
- Width = 855
- End
- Begin Label Label1
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 35
- Left = 0
- TabIndex = 52
- Top = 3360
- Width = 735
- End
- Begin Label Label1
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 34
- Left = 5160
- TabIndex = 50
- Top = 2880
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 33
- Left = 4320
- TabIndex = 49
- Top = 2880
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 32
- Left = 3360
- TabIndex = 48
- Top = 2880
- Width = 975
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 31
- Left = 2400
- TabIndex = 47
- Top = 2880
- Width = 975
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 30
- Left = 1560
- TabIndex = 46
- Top = 2880
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 29
- Left = 720
- TabIndex = 45
- Top = 2880
- Width = 855
- End
- Begin Label Label1
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 28
- Left = 0
- TabIndex = 44
- Top = 2880
- Width = 735
- End
- Begin Label Label1
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 27
- Left = 5160
- TabIndex = 43
- Top = 2400
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 26
- Left = 4320
- TabIndex = 42
- Top = 2400
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 25
- Left = 3360
- TabIndex = 41
- Top = 2400
- Width = 975
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 24
- Left = 2400
- TabIndex = 40
- Top = 2400
- Width = 975
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 23
- Left = 1560
- TabIndex = 39
- Top = 2400
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 22
- Left = 720
- TabIndex = 38
- Top = 2400
- Width = 855
- End
- Begin Label Label1
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 21
- Left = 0
- TabIndex = 37
- Top = 2400
- Width = 735
- End
- Begin Label Label1
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 20
- Left = 5160
- TabIndex = 36
- Top = 1920
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 19
- Left = 4320
- TabIndex = 35
- Top = 1920
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 18
- Left = 3360
- TabIndex = 34
- Top = 1920
- Width = 975
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 17
- Left = 2400
- TabIndex = 33
- Top = 1920
- Width = 975
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 16
- Left = 1560
- TabIndex = 32
- Top = 1920
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 15
- Left = 720
- TabIndex = 31
- Top = 1920
- Width = 855
- End
- Begin Label Label1
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 14
- Left = 0
- TabIndex = 30
- Top = 1920
- Width = 735
- End
- Begin Label Label1
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 13
- Left = 5160
- TabIndex = 29
- Top = 1440
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 12
- Left = 4320
- TabIndex = 28
- Top = 1440
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 11
- Left = 3360
- TabIndex = 27
- Top = 1440
- Width = 975
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 10
- Left = 2400
- TabIndex = 26
- Top = 1440
- Width = 975
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 9
- Left = 1560
- TabIndex = 25
- Top = 1440
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 8
- Left = 720
- TabIndex = 24
- Top = 1440
- Width = 855
- End
- Begin Label Label1
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 7
- Left = 0
- TabIndex = 23
- Top = 1440
- Width = 735
- End
- Begin Label Label1
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 6
- Left = 5160
- TabIndex = 22
- Top = 960
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 5
- Left = 4320
- TabIndex = 21
- Top = 960
- Width = 855
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 4
- Left = 3360
- TabIndex = 20
- Top = 960
- Width = 975
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 3
- Left = 2400
- TabIndex = 19
- Top = 960
- Width = 975
- End
- Begin Label Label1
- Alignment = 2 'Center
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 2
- Left = 1560
- TabIndex = 18
- Top = 960
- Width = 855
- End
- Begin Label Label1
- Alignment = 2 'Center
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Index = 1
- Left = 720
- TabIndex = 2
- Top = 960
- Width = 855
- End
- Begin Label Label1
- Alignment = 2 'Center
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 495
- Index = 0
- Left = 0
- TabIndex = 1
- Top = 960
- Width = 735
- End
- Begin Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = " Sun Mon Tue Wed Thur Fri Sat"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 375
- Left = 0
- TabIndex = 5
- Top = 480
- Width = 6015
- End
- Begin Label monthLabel
- Alignment = 2 'Center
- BackColor = &H0000FFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "Month"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 13.5
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 375
- Left = 1920
- TabIndex = 51
- Top = 120
- Width = 2055
- End
- End
- Begin Label Label3
- BorderStyle = 1 'Fixed Single
- Caption = "Year Desired"
- Height = 375
- Left = 120
- TabIndex = 7
- Top = 5160
- Width = 1335
- End
- Dim True As Integer
- Dim false As Integer
- Dim currentmonth As Integer
- Sub Command1_Click (index As Integer)
- currentmonth = index
- Select Case Val(yearentered.Text)
- Case Is < 1900, Is > 2100
- MsgBox ("Day Out Of Range: ") + yearentered.Text
- yearentered.SetFocus
- Exit Sub
- End Select
- Select Case index
- Case 0 To 11
- X% = index + 1
- RelVal# = DateSerial(1990, X%, 1)
- monthlabel.caption = Format$(RelVal#, "mmmm")
- Case Else
- monthlabel.caption = (" ")
- End Select
- RelVal# = DateSerial(Val(yearentered.Text), X%, 1)
- Select Case index
-
- Case 0, 2, 4, 6, 7, 9, 11
- NumbDays% = 31
- GoSub LoadDays
- Case 1
- TheYear% = Val(yearentered.Text)
- By4% = TheYear% Mod 4
- If By4% = 0 Then
- NumbDays% = 29
- Else
- NumbDays% = 28
- End If
- GoSub LoadDays
- Case 3, 5, 8, 10
- NumbDays% = 31
- GoSub LoadDays
-
- Case Else
- MsgBox ("Please Select Month")
- End Select
- Exit Sub
- LoadDays:
- DayNumber% = Weekday(RelVal#)
- xxxx = 0
- Z% = 0
- For xx% = 0 To 41
- Label1(xx%).caption = ""
- Next xx%
- For xx% = (DayNumber% - 1) To (NumbDays% + DayNumber% - 2)
- Z% = Z% + 1
- Label1(xx%).caption = Str$(Z%)
- Next xx%
- Return
- End Sub
- Sub Command2_Click ()
- Text$ = "Use this as you see fit. The code is yours. If it saves you an hour of coding, "
- Text$ = Text$ + " then send me the value of 1/4 hour of your time. Send contributions to"
- Text$ = Text$ + " Al Meadows c/o Andrews Davis Law Firm, 500 West Main, Oklahoma City, Ok. 73102"
- MsgBox Text$
- End Sub
- Sub Form_Load ()
- CalForm.Left = 1275
- CalForm.Top = 765
- Frame1.Left = (ScaleWidth - Frame1.Width) / 2
- True = -1
- false = 0
- For I% = 0 To 41
- currentmonth = 13
- Label1(I%).alignment = 2
- Label1(I%).caption = ""
- Label1(I%).fontsize = 9.75
- Next I%
- Timer1.enabled = True
- End Sub
- Sub timer1_timer ()
- yearentered.SetFocus
- Timer1.enabled = False
- End Sub
- Sub YearEntered_KeyPress (keyascii As Integer)
- Select Case keyascii
- Case 13
- Command1_Click (currentmonth)
- End Select
- End Sub
-