home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Work_with_547982122002.psc / cfCalendar.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2002-02-12  |  38.3 KB  |  1,209 lines

  1. VERSION 5.00
  2. Begin VB.Form frmCalendar 
  3.    AutoRedraw      =   -1  'True
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Select Date"
  6.    ClientHeight    =   5475
  7.    ClientLeft      =   3900
  8.    ClientTop       =   2010
  9.    ClientWidth     =   4890
  10.    Icon            =   "cfCalendar.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    LockControls    =   -1  'True
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   5475
  16.    ScaleWidth      =   4890
  17.    Begin VB.CommandButton cmdYRPrevNext 
  18.       Height          =   435
  19.       Index           =   0
  20.       Left            =   2655
  21.       Picture         =   "cfCalendar.frx":030A
  22.       Style           =   1  'Graphical
  23.       TabIndex        =   76
  24.       Top             =   30
  25.       UseMaskColor    =   -1  'True
  26.       Width           =   330
  27.    End
  28.    Begin VB.CommandButton cmdYRPrevNext 
  29.       Height          =   435
  30.       Index           =   1
  31.       Left            =   4410
  32.       Picture         =   "cfCalendar.frx":03C4
  33.       Style           =   1  'Graphical
  34.       TabIndex        =   75
  35.       Top             =   30
  36.       UseMaskColor    =   -1  'True
  37.       Width           =   330
  38.    End
  39.    Begin VB.CommandButton cmdMonPrevNext 
  40.       Height          =   435
  41.       Index           =   1
  42.       Left            =   2130
  43.       Picture         =   "cfCalendar.frx":047E
  44.       Style           =   1  'Graphical
  45.       TabIndex        =   74
  46.       Top             =   30
  47.       UseMaskColor    =   -1  'True
  48.       Width           =   330
  49.    End
  50.    Begin VB.CommandButton cmdMonPrevNext 
  51.       Height          =   435
  52.       Index           =   0
  53.       Left            =   135
  54.       Picture         =   "cfCalendar.frx":0538
  55.       Style           =   1  'Graphical
  56.       TabIndex        =   73
  57.       Top             =   30
  58.       UseMaskColor    =   -1  'True
  59.       Width           =   330
  60.    End
  61.    Begin VB.PictureBox Picture1 
  62.       BackColor       =   &H80000005&
  63.       Height          =   3255
  64.       Left            =   0
  65.       ScaleHeight     =   3195
  66.       ScaleWidth      =   4785
  67.       TabIndex        =   16
  68.       Top             =   495
  69.       Width           =   4845
  70.       Begin VB.Label lblDays 
  71.          Alignment       =   2  'Center
  72.          BackStyle       =   0  'Transparent
  73.          Caption         =   "Mon"
  74.          Height          =   255
  75.          Index           =   1
  76.          Left            =   1020
  77.          TabIndex        =   72
  78.          Top             =   0
  79.          Width           =   615
  80.       End
  81.       Begin VB.Label lblDays 
  82.          Alignment       =   2  'Center
  83.          BackStyle       =   0  'Transparent
  84.          Caption         =   "Tue"
  85.          Height          =   255
  86.          Index           =   2
  87.          Left            =   1620
  88.          TabIndex        =   71
  89.          Top             =   0
  90.          Width           =   615
  91.       End
  92.       Begin VB.Label lblDays 
  93.          Alignment       =   2  'Center
  94.          BackStyle       =   0  'Transparent
  95.          Caption         =   "Wed"
  96.          Height          =   255
  97.          Index           =   3
  98.          Left            =   2220
  99.          TabIndex        =   70
  100.          Top             =   0
  101.          Width           =   615
  102.       End
  103.       Begin VB.Label lblDays 
  104.          Alignment       =   2  'Center
  105.          BackStyle       =   0  'Transparent
  106.          Caption         =   "Thu"
  107.          Height          =   255
  108.          Index           =   4
  109.          Left            =   2820
  110.          TabIndex        =   69
  111.          Top             =   0
  112.          Width           =   615
  113.       End
  114.       Begin VB.Label lblDays 
  115.          Alignment       =   2  'Center
  116.          BackStyle       =   0  'Transparent
  117.          Caption         =   "Fri"
  118.          Height          =   255
  119.          Index           =   5
  120.          Left            =   3420
  121.          TabIndex        =   68
  122.          Top             =   0
  123.          Width           =   615
  124.       End
  125.       Begin VB.Label lblDays 
  126.          Alignment       =   2  'Center
  127.          BackStyle       =   0  'Transparent
  128.          Caption         =   "Sat"
  129.          Height          =   255
  130.          Index           =   6
  131.          Left            =   4020
  132.          TabIndex        =   67
  133.          Top             =   0
  134.          Width           =   615
  135.       End
  136.       Begin VB.Label lblDays 
  137.          Alignment       =   2  'Center
  138.          BackStyle       =   0  'Transparent
  139.          Caption         =   "Sun"
  140.          Height          =   255
  141.          Index           =   0
  142.          Left            =   420
  143.          TabIndex        =   66
  144.          Top             =   0
  145.          Width           =   615
  146.       End
  147.       Begin VB.Label lblDate 
  148.          BorderStyle     =   1  'Fixed Single
  149.          Caption         =   "Label1"
  150.          Height          =   495
  151.          Index           =   0
  152.          Left            =   420
  153.          TabIndex        =   65
  154.          Top             =   240
  155.          Width           =   615
  156.       End
  157.       Begin VB.Label lblDate 
  158.          BorderStyle     =   1  'Fixed Single
  159.          Caption         =   "Label1"
  160.          Height          =   495
  161.          Index           =   1
  162.          Left            =   1020
  163.          TabIndex        =   64
  164.          Top             =   240
  165.          Width           =   615
  166.       End
  167.       Begin VB.Label lblDate 
  168.          BorderStyle     =   1  'Fixed Single
  169.          Caption         =   "Label1"
  170.          Height          =   495
  171.          Index           =   2
  172.          Left            =   1620
  173.          TabIndex        =   63
  174.          Top             =   240
  175.          Width           =   615
  176.       End
  177.       Begin VB.Label lblDate 
  178.          BorderStyle     =   1  'Fixed Single
  179.          Caption         =   "Label1"
  180.          Height          =   495
  181.          Index           =   3
  182.          Left            =   2220
  183.          TabIndex        =   62
  184.          Top             =   240
  185.          Width           =   615
  186.       End
  187.       Begin VB.Label lblDate 
  188.          BorderStyle     =   1  'Fixed Single
  189.          Caption         =   "Label1"
  190.          Height          =   495
  191.          Index           =   4
  192.          Left            =   2820
  193.          TabIndex        =   61
  194.          Top             =   240
  195.          Width           =   615
  196.       End
  197.       Begin VB.Label lblDate 
  198.          BorderStyle     =   1  'Fixed Single
  199.          Caption         =   "Label1"
  200.          Height          =   495
  201.          Index           =   5
  202.          Left            =   3420
  203.          TabIndex        =   60
  204.          Top             =   240
  205.          Width           =   615
  206.       End
  207.       Begin VB.Label lblDate 
  208.          BorderStyle     =   1  'Fixed Single
  209.          Caption         =   "Label1"
  210.          Height          =   495
  211.          Index           =   6
  212.          Left            =   4020
  213.          TabIndex        =   59
  214.          Top             =   240
  215.          Width           =   615
  216.       End
  217.       Begin VB.Label lblDate 
  218.          BorderStyle     =   1  'Fixed Single
  219.          Caption         =   "Label1"
  220.          Height          =   495
  221.          Index           =   7
  222.          Left            =   420
  223.          TabIndex        =   58
  224.          Top             =   720
  225.          Width           =   615
  226.       End
  227.       Begin VB.Label lblDate 
  228.          BorderStyle     =   1  'Fixed Single
  229.          Caption         =   "Label1"
  230.          Height          =   495
  231.          Index           =   8
  232.          Left            =   1020
  233.          TabIndex        =   57
  234.          Top             =   720
  235.          Width           =   615
  236.       End
  237.       Begin VB.Label lblDate 
  238.          BorderStyle     =   1  'Fixed Single
  239.          Caption         =   "Label1"
  240.          Height          =   495
  241.          Index           =   9
  242.          Left            =   1620
  243.          TabIndex        =   56
  244.          Top             =   720
  245.          Width           =   615
  246.       End
  247.       Begin VB.Label lblDate 
  248.          BorderStyle     =   1  'Fixed Single
  249.          Caption         =   "Label1"
  250.          Height          =   495
  251.          Index           =   10
  252.          Left            =   2220
  253.          TabIndex        =   55
  254.          Top             =   720
  255.          Width           =   615
  256.       End
  257.       Begin VB.Label lblDate 
  258.          BorderStyle     =   1  'Fixed Single
  259.          Caption         =   "Label1"
  260.          Height          =   495
  261.          Index           =   11
  262.          Left            =   2820
  263.          TabIndex        =   54
  264.          Top             =   720
  265.          Width           =   615
  266.       End
  267.       Begin VB.Label lblDate 
  268.          BorderStyle     =   1  'Fixed Single
  269.          Caption         =   "Label1"
  270.          Height          =   495
  271.          Index           =   12
  272.          Left            =   3420
  273.          TabIndex        =   53
  274.          Top             =   720
  275.          Width           =   615
  276.       End
  277.       Begin VB.Label lblDate 
  278.          BorderStyle     =   1  'Fixed Single
  279.          Caption         =   "Label1"
  280.          Height          =   495
  281.          Index           =   13
  282.          Left            =   4020
  283.          TabIndex        =   52
  284.          Top             =   720
  285.          Width           =   615
  286.       End
  287.       Begin VB.Label lblDate 
  288.          BorderStyle     =   1  'Fixed Single
  289.          Caption         =   "Label1"
  290.          Height          =   495
  291.          Index           =   14
  292.          Left            =   420
  293.          TabIndex        =   51
  294.          Top             =   1200
  295.          Width           =   615
  296.       End
  297.       Begin VB.Label lblDate 
  298.          BorderStyle     =   1  'Fixed Single
  299.          Caption         =   "Label1"
  300.          Height          =   495
  301.          Index           =   15
  302.          Left            =   1020
  303.          TabIndex        =   50
  304.          Top             =   1200
  305.          Width           =   615
  306.       End
  307.       Begin VB.Label lblDate 
  308.          BorderStyle     =   1  'Fixed Single
  309.          Caption         =   "Label1"
  310.          Height          =   495
  311.          Index           =   16
  312.          Left            =   1620
  313.          TabIndex        =   49
  314.          Top             =   1200
  315.          Width           =   615
  316.       End
  317.       Begin VB.Label lblDate 
  318.          BorderStyle     =   1  'Fixed Single
  319.          Caption         =   "Label1"
  320.          Height          =   495
  321.          Index           =   17
  322.          Left            =   2220
  323.          TabIndex        =   48
  324.          Top             =   1200
  325.          Width           =   615
  326.       End
  327.       Begin VB.Label lblDate 
  328.          BorderStyle     =   1  'Fixed Single
  329.          Caption         =   "Label1"
  330.          Height          =   495
  331.          Index           =   18
  332.          Left            =   2820
  333.          TabIndex        =   47
  334.          Top             =   1200
  335.          Width           =   615
  336.       End
  337.       Begin VB.Label lblDate 
  338.          BorderStyle     =   1  'Fixed Single
  339.          Caption         =   "Label1"
  340.          Height          =   495
  341.          Index           =   19
  342.          Left            =   3420
  343.          TabIndex        =   46
  344.          Top             =   1200
  345.          Width           =   615
  346.       End
  347.       Begin VB.Label lblDate 
  348.          BorderStyle     =   1  'Fixed Single
  349.          Caption         =   "Label1"
  350.          Height          =   495
  351.          Index           =   20
  352.          Left            =   4020
  353.          TabIndex        =   45
  354.          Top             =   1200
  355.          Width           =   615
  356.       End
  357.       Begin VB.Label lblDate 
  358.          BorderStyle     =   1  'Fixed Single
  359.          Caption         =   "Label1"
  360.          Height          =   495
  361.          Index           =   21
  362.          Left            =   420
  363.          TabIndex        =   44
  364.          Top             =   1680
  365.          Width           =   615
  366.       End
  367.       Begin VB.Label lblDate 
  368.          BorderStyle     =   1  'Fixed Single
  369.          Caption         =   "Label1"
  370.          Height          =   495
  371.          Index           =   22
  372.          Left            =   1020
  373.          TabIndex        =   43
  374.          Top             =   1680
  375.          Width           =   615
  376.       End
  377.       Begin VB.Label lblDate 
  378.          BorderStyle     =   1  'Fixed Single
  379.          Caption         =   "Label1"
  380.          Height          =   495
  381.          Index           =   23
  382.          Left            =   1620
  383.          TabIndex        =   42
  384.          Top             =   1680
  385.          Width           =   615
  386.       End
  387.       Begin VB.Label lblDate 
  388.          BorderStyle     =   1  'Fixed Single
  389.          Caption         =   "Label1"
  390.          Height          =   495
  391.          Index           =   24
  392.          Left            =   2220
  393.          TabIndex        =   41
  394.          Top             =   1680
  395.          Width           =   615
  396.       End
  397.       Begin VB.Label lblDate 
  398.          BorderStyle     =   1  'Fixed Single
  399.          Caption         =   "Label1"
  400.          Height          =   495
  401.          Index           =   25
  402.          Left            =   2820
  403.          TabIndex        =   40
  404.          Top             =   1680
  405.          Width           =   615
  406.       End
  407.       Begin VB.Label lblDate 
  408.          BorderStyle     =   1  'Fixed Single
  409.          Caption         =   "Label1"
  410.          Height          =   495
  411.          Index           =   26
  412.          Left            =   3420
  413.          TabIndex        =   39
  414.          Top             =   1680
  415.          Width           =   615
  416.       End
  417.       Begin VB.Label lblDate 
  418.          BorderStyle     =   1  'Fixed Single
  419.          Caption         =   "Label1"
  420.          Height          =   495
  421.          Index           =   27
  422.          Left            =   4020
  423.          TabIndex        =   38
  424.          Top             =   1680
  425.          Width           =   615
  426.       End
  427.       Begin VB.Label lblDate 
  428.          BorderStyle     =   1  'Fixed Single
  429.          Caption         =   "Label1"
  430.          Height          =   495
  431.          Index           =   28
  432.          Left            =   420
  433.          TabIndex        =   37
  434.          Top             =   2160
  435.          Width           =   615
  436.       End
  437.       Begin VB.Label lblDate 
  438.          BorderStyle     =   1  'Fixed Single
  439.          Caption         =   "Label1"
  440.          Height          =   495
  441.          Index           =   29
  442.          Left            =   1020
  443.          TabIndex        =   36
  444.          Top             =   2160
  445.          Width           =   615
  446.       End
  447.       Begin VB.Label lblDate 
  448.          BorderStyle     =   1  'Fixed Single
  449.          Caption         =   "Label1"
  450.          Height          =   495
  451.          Index           =   30
  452.          Left            =   1620
  453.          TabIndex        =   35
  454.          Top             =   2160
  455.          Width           =   615
  456.       End
  457.       Begin VB.Label lblDate 
  458.          BorderStyle     =   1  'Fixed Single
  459.          Caption         =   "Label1"
  460.          Height          =   495
  461.          Index           =   31
  462.          Left            =   2220
  463.          TabIndex        =   34
  464.          Top             =   2160
  465.          Width           =   615
  466.       End
  467.       Begin VB.Label lblDate 
  468.          BorderStyle     =   1  'Fixed Single
  469.          Caption         =   "Label1"
  470.          Height          =   495
  471.          Index           =   32
  472.          Left            =   2820
  473.          TabIndex        =   33
  474.          Top             =   2160
  475.          Width           =   615
  476.       End
  477.       Begin VB.Label lblDate 
  478.          BorderStyle     =   1  'Fixed Single
  479.          Caption         =   "Label1"
  480.          Height          =   495
  481.          Index           =   33
  482.          Left            =   3420
  483.          TabIndex        =   32
  484.          Top             =   2160
  485.          Width           =   615
  486.       End
  487.       Begin VB.Label lblDate 
  488.          BorderStyle     =   1  'Fixed Single
  489.          Caption         =   "Label1"
  490.          Height          =   495
  491.          Index           =   34
  492.          Left            =   4020
  493.          TabIndex        =   31
  494.          Top             =   2160
  495.          Width           =   615
  496.       End
  497.       Begin VB.Label lblDate 
  498.          BorderStyle     =   1  'Fixed Single
  499.          Caption         =   "Label1"
  500.          Height          =   495
  501.          Index           =   35
  502.          Left            =   420
  503.          TabIndex        =   30
  504.          Top             =   2640
  505.          Width           =   615
  506.       End
  507.       Begin VB.Label lblDate 
  508.          BorderStyle     =   1  'Fixed Single
  509.          Caption         =   "Label1"
  510.          Height          =   495
  511.          Index           =   36
  512.          Left            =   1020
  513.          TabIndex        =   29
  514.          Top             =   2640
  515.          Width           =   615
  516.       End
  517.       Begin VB.Label lblDate 
  518.          BorderStyle     =   1  'Fixed Single
  519.          Caption         =   "Label1"
  520.          Height          =   495
  521.          Index           =   37
  522.          Left            =   1620
  523.          TabIndex        =   28
  524.          Top             =   2640
  525.          Width           =   615
  526.       End
  527.       Begin VB.Label lblDate 
  528.          BorderStyle     =   1  'Fixed Single
  529.          Caption         =   "Label1"
  530.          Height          =   495
  531.          Index           =   38
  532.          Left            =   2220
  533.          TabIndex        =   27
  534.          Top             =   2640
  535.          Width           =   615
  536.       End
  537.       Begin VB.Label lblDate 
  538.          BorderStyle     =   1  'Fixed Single
  539.          Caption         =   "Label1"
  540.          Height          =   495
  541.          Index           =   39
  542.          Left            =   2820
  543.          TabIndex        =   26
  544.          Top             =   2640
  545.          Width           =   615
  546.       End
  547.       Begin VB.Label lblDate 
  548.          BorderStyle     =   1  'Fixed Single
  549.          Caption         =   "Label1"
  550.          Height          =   495
  551.          Index           =   40
  552.          Left            =   3420
  553.          TabIndex        =   25
  554.          Top             =   2640
  555.          Width           =   615
  556.       End
  557.       Begin VB.Label lblDate 
  558.          BorderStyle     =   1  'Fixed Single
  559.          Caption         =   "Label1"
  560.          Height          =   495
  561.          Index           =   41
  562.          Left            =   4020
  563.          TabIndex        =   24
  564.          Top             =   2640
  565.          Width           =   615
  566.       End
  567.       Begin VB.Label lblWeek 
  568.          Alignment       =   2  'Center
  569.          BackStyle       =   0  'Transparent
  570.          Caption         =   "55"
  571.          Height          =   225
  572.          Index           =   0
  573.          Left            =   135
  574.          TabIndex        =   23
  575.          Top             =   390
  576.          Width           =   255
  577.       End
  578.       Begin VB.Label lblWeek 
  579.          Alignment       =   2  'Center
  580.          BackStyle       =   0  'Transparent
  581.          Caption         =   "55"
  582.          Height          =   225
  583.          Index           =   1
  584.          Left            =   135
  585.          TabIndex        =   22
  586.          Top             =   870
  587.          Width           =   255
  588.       End
  589.       Begin VB.Label lblWeek 
  590.          Alignment       =   2  'Center
  591.          BackStyle       =   0  'Transparent
  592.          Caption         =   "55"
  593.          Height          =   225
  594.          Index           =   2
  595.          Left            =   135
  596.          TabIndex        =   21
  597.          Top             =   1335
  598.          Width           =   255
  599.       End
  600.       Begin VB.Label lblWeek 
  601.          Alignment       =   2  'Center
  602.          BackStyle       =   0  'Transparent
  603.          Caption         =   "55"
  604.          Height          =   225
  605.          Index           =   3
  606.          Left            =   135
  607.          TabIndex        =   20
  608.          Top             =   1815
  609.          Width           =   255
  610.       End
  611.       Begin VB.Label lblWeek 
  612.          Alignment       =   2  'Center
  613.          BackStyle       =   0  'Transparent
  614.          Caption         =   "55"
  615.          Height          =   225
  616.          Index           =   4
  617.          Left            =   135
  618.          TabIndex        =   19
  619.          Top             =   2280
  620.          Width           =   255
  621.       End
  622.       Begin VB.Label lblWeek 
  623.          Alignment       =   2  'Center
  624.          BackStyle       =   0  'Transparent
  625.          Caption         =   "55"
  626.          Height          =   225
  627.          Index           =   5
  628.          Left            =   135
  629.          TabIndex        =   18
  630.          Top             =   2760
  631.          Width           =   255
  632.       End
  633.       Begin VB.Label lblWeek 
  634.          Alignment       =   2  'Center
  635.          BackStyle       =   0  'Transparent
  636.          Caption         =   "Wk"
  637.          Height          =   225
  638.          Index           =   6
  639.          Left            =   75
  640.          TabIndex        =   17
  641.          Top             =   90
  642.          Width           =   255
  643.       End
  644.    End
  645.    Begin VB.Frame fraTime 
  646.       BorderStyle     =   0  'None
  647.       Caption         =   "Frame1"
  648.       Height          =   495
  649.       Left            =   840
  650.       TabIndex        =   5
  651.       Top             =   3795
  652.       Width           =   2970
  653.       Begin VB.TextBox txtHours 
  654.          BeginProperty Font 
  655.             Name            =   "Arial"
  656.             Size            =   15.75
  657.             Charset         =   0
  658.             Weight          =   700
  659.             Underline       =   0   'False
  660.             Italic          =   0   'False
  661.             Strikethrough   =   0   'False
  662.          EndProperty
  663.          Height          =   480
  664.          Left            =   540
  665.          TabIndex        =   14
  666.          Text            =   "23"
  667.          Top             =   0
  668.          Width           =   495
  669.       End
  670.       Begin VB.CommandButton cmdUpHrs 
  671.          Caption         =   "+"
  672.          Height          =   255
  673.          Left            =   1020
  674.          TabIndex        =   13
  675.          Top             =   0
  676.          Width           =   255
  677.       End
  678.       Begin VB.CommandButton cmdDownHrs 
  679.          Caption         =   "-"
  680.          Height          =   255
  681.          Left            =   1020
  682.          TabIndex        =   12
  683.          Top             =   240
  684.          Width           =   255
  685.       End
  686.       Begin VB.TextBox txtMin 
  687.          BeginProperty Font 
  688.             Name            =   "Arial"
  689.             Size            =   15.75
  690.             Charset         =   0
  691.             Weight          =   700
  692.             Underline       =   0   'False
  693.             Italic          =   0   'False
  694.             Strikethrough   =   0   'False
  695.          EndProperty
  696.          Height          =   480
  697.          Left            =   1380
  698.          TabIndex        =   11
  699.          Text            =   "23"
  700.          Top             =   0
  701.          Width           =   495
  702.       End
  703.       Begin VB.CommandButton cmdUpMin 
  704.          Caption         =   "+"
  705.          Height          =   255
  706.          Left            =   1860
  707.          TabIndex        =   10
  708.          Top             =   0
  709.          Width           =   255
  710.       End
  711.       Begin VB.CommandButton cmdDownMin 
  712.          Caption         =   "-"
  713.          Height          =   255
  714.          Left            =   1860
  715.          TabIndex        =   9
  716.          Top             =   240
  717.          Width           =   255
  718.       End
  719.       Begin VB.TextBox txtSec 
  720.          BeginProperty Font 
  721.             Name            =   "Arial"
  722.             Size            =   15.75
  723.             Charset         =   0
  724.             Weight          =   700
  725.             Underline       =   0   'False
  726.             Italic          =   0   'False
  727.             Strikethrough   =   0   'False
  728.          EndProperty
  729.          Height          =   480
  730.          Left            =   2220
  731.          TabIndex        =   8
  732.          Text            =   "23"
  733.          Top             =   0
  734.          Width           =   495
  735.       End
  736.       Begin VB.CommandButton cmdUpSec 
  737.          Caption         =   "+"
  738.          Height          =   255
  739.          Left            =   2700
  740.          TabIndex        =   7
  741.          Top             =   0
  742.          Width           =   255
  743.       End
  744.       Begin VB.CommandButton cmdDownSec 
  745.          Caption         =   "-"
  746.          Height          =   255
  747.          Left            =   2700
  748.          TabIndex        =   6
  749.          Top             =   240
  750.          Width           =   255
  751.       End
  752.       Begin VB.Label Label3 
  753.          Alignment       =   1  'Right Justify
  754.          AutoSize        =   -1  'True
  755.          Caption         =   " Time: "
  756.          Height          =   195
  757.          Left            =   15
  758.          TabIndex        =   15
  759.          Top             =   120
  760.          Width           =   480
  761.       End
  762.    End
  763.    Begin VB.CommandButton cmdSelect 
  764.       Caption         =   "Ok"
  765.       Height          =   450
  766.       Left            =   3375
  767.       TabIndex        =   3
  768.       Top             =   4575
  769.       Width           =   1290
  770.    End
  771.    Begin VB.TextBox txtCurDate 
  772.       Height          =   285
  773.       Left            =   135
  774.       TabIndex        =   2
  775.       Top             =   4935
  776.       Visible         =   0   'False
  777.       Width           =   2625
  778.    End
  779.    Begin VB.ComboBox cmbYear 
  780.       Height          =   315
  781.       Left            =   3030
  782.       Style           =   2  'Dropdown List
  783.       TabIndex        =   1
  784.       Top             =   90
  785.       Width           =   1335
  786.    End
  787.    Begin VB.ComboBox cmbMonth 
  788.       Height          =   315
  789.       Left            =   510
  790.       TabIndex        =   0
  791.       Text            =   "cmbMonth"
  792.       Top             =   90
  793.       Width           =   1575
  794.    End
  795.    Begin VB.Line Line1 
  796.       BorderColor     =   &H80000010&
  797.       Index           =   3
  798.       X1              =   330
  799.       X2              =   4680
  800.       Y1              =   4425
  801.       Y2              =   4425
  802.    End
  803.    Begin VB.Line Line1 
  804.       BorderColor     =   &H80000014&
  805.       Index           =   2
  806.       X1              =   330
  807.       X2              =   4680
  808.       Y1              =   4440
  809.       Y2              =   4440
  810.    End
  811.    Begin VB.Label lblDate 
  812.       BackStyle       =   0  'Transparent
  813.       Caption         =   "Label3"
  814.       Height          =   240
  815.       Index           =   42
  816.       Left            =   105
  817.       TabIndex        =   4
  818.       Top             =   4605
  819.       Width           =   3150
  820.    End
  821. Attribute VB_Name = "frmCalendar"
  822. Attribute VB_GlobalNameSpace = False
  823. Attribute VB_Creatable = False
  824. Attribute VB_PredeclaredId = True
  825. Attribute VB_Exposed = False
  826. '/*************************************/
  827. '/* Author: Morgan Haueisen
  828. '/* Copyright (c) 1998-2002
  829. '/*************************************/
  830. 'Option Explicit
  831. Public PassDate As Variant
  832. Public cfWeekNumber As Integer
  833. Public cfFirstday As Date
  834. Public cfFirstWeekDay As Integer
  835. Public ShowYear As Boolean
  836. Public ShowTime As Boolean
  837. Public ShowWeeks As Boolean
  838. Dim cfCurDay As Date
  839. Dim cfDayIndex As Integer
  840. Dim cfWeekDay As Integer
  841. Dim cfYearIndex As Integer
  842. Dim cfPassedFirstDay As Boolean
  843. Private Sub cmbMonth_Click()
  844.  Dim tDate As Variant
  845.     tDate = cmbMonth.ListIndex + 1 & Format(txtCurDate, "/dd/yyyy")
  846.     If IsDate(tDate) Then
  847.         If CDate(txtCurDate) <> CDate(tDate) Then
  848.             txtCurDate = CDate(tDate)
  849.         End If
  850.     Else
  851.         txtCurDate = CDate(cmbMonth.ListIndex + 1 & "/01/" & Format(txtCurDate, "yyyy"))
  852.     End If
  853. End Sub
  854. Private Sub cmbMonth_KeyUp(KeyCode As Integer, Shift As Integer)
  855.     If KeyCode = 37 Then
  856.         cfDayIndex = cfDayIndex - 1
  857.         If cfDayIndex < 0 Then cfDayIndex = 0
  858.     ElseIf KeyCode = 39 Then
  859.         cfDayIndex = cfDayIndex + 1
  860.         If cfDayIndex > 41 Then cfDayIndex = 41
  861.     End If
  862.     txtCurDate = lblDate(cfDayIndex).Tag
  863. End Sub
  864. Private Sub cmbYear_Click()
  865.   Dim tDate As Date
  866.             
  867.     If Not cfPassedFirstDay Then
  868.         cfFirstday = CDate("1/1/" & cmbYear)
  869.         'cfWeekDay = vbSunday
  870.         Call cfFixFirstDay
  871.         tDate = Format(txtCurDate, "mm/dd/") & cmbYear
  872.         txtCurDate = tDate
  873.     End If
  874.     tDate = Format(txtCurDate, "mm/dd/") & cmbYear
  875.     If IsDate(tDate) Then
  876.         If cmbYear.ListIndex <> cfYearIndex Then
  877.             cfFirstday = DateAdd("yyyy", cmbYear.ListIndex - cfYearIndex, cfFirstday)
  878.              cfYearIndex = cmbYear.ListIndex
  879.         End If
  880.         txtCurDate = tDate
  881.     End If
  882. End Sub
  883. Private Sub cmdDownHrs_Click()
  884.     If IsNumeric(txtHours) Then
  885.         txtHours = Format(txtHours - 1, "00")
  886.         If txtHours < 0 Then
  887.             txtHours = 23
  888.             txtCurDate = CDate(txtCurDate) - 1
  889.         End If
  890.     End If
  891. End Sub
  892. Private Sub cmdDownMin_Click()
  893.         If IsNumeric(txtMin) Then
  894.         txtMin = Format(txtMin - 1, "00")
  895.         If txtMin < 0 Then
  896.             txtMin = 59
  897.             cmdDownHrs_Click
  898.         End If
  899.     End If
  900. End Sub
  901. Private Sub cmdDownSec_Click()
  902.     If IsNumeric(txtSec) Then
  903.         txtSec = Format(txtSec - 1, "00")
  904.         If txtSec < 0 Then
  905.             txtSec = 59
  906.             cmdDownMin_Click
  907.         End If
  908.     End If
  909. End Sub
  910. Private Sub cmdMonPrevNext_Click(Index As Integer)
  911.   Dim i As Integer
  912.     i = cmbMonth.ListIndex
  913.     Select Case Index
  914.     Case 0
  915.         i = i - 1
  916.         If i < 0 Then
  917.             If ShowYear Then
  918.                 i = cmbYear.ListIndex
  919.                 i = i - 1
  920.                 If i < 0 Then i = 0
  921.                 cmbYear.ListIndex = i
  922.                 cmbMonth.ListIndex = cmbMonth.ListCount - 1
  923.             Else
  924.                 i = 0
  925.             End If
  926.         Else
  927.             cmbMonth.ListIndex = i
  928.         End If
  929.     Case Else
  930.         i = i + 1
  931.         If i > cmbMonth.ListCount - 1 Then
  932.             If ShowYear Then
  933.                 i = cmbYear.ListIndex
  934.                 i = i + 1
  935.                 If i > cmbYear.ListCount - 1 Then i = cmbYear.ListCount - 1
  936.                 cmbYear.ListIndex = i
  937.                 cmbMonth.ListIndex = 0
  938.             Else
  939.                 i = cmbMonth.ListCount - 1
  940.             End If
  941.         Else
  942.             cmbMonth.ListIndex = i
  943.         End If
  944.     End Select
  945. End Sub
  946. Private Sub cmdUpHrs_Click()
  947.     If IsNumeric(txtHours) Then
  948.         txtHours = Format(txtHours + 1, "00")
  949.         If txtHours > 23 Then
  950.             txtHours = "00"
  951.             txtCurDate = CDate(txtCurDate) + 1
  952.         End If
  953.     End If
  954. End Sub
  955. Private Sub cmdUpMin_Click()
  956.     If IsNumeric(txtMin) Then
  957.         txtMin = Format(txtMin + 1, "00")
  958.         If txtMin > 59 Then
  959.             txtMin = "00"
  960.             cmdUpHrs_Click
  961.         End If
  962.     End If
  963. End Sub
  964. Private Sub cmdUpSec_Click()
  965.     If IsNumeric(txtSec) Then
  966.         txtSec = Format(txtSec + 1, "00")
  967.         If txtSec > 59 Then
  968.             txtSec = 0
  969.             cmdUpMin_Click
  970.         End If
  971.     End If
  972. End Sub
  973. Private Sub cmdSelect_Click()
  974.     If ShowTime Then
  975.         PassDate = CDate(Format(txtCurDate, "mm/dd/yyyy") & " " & txtHours & ":" & txtMin & ":" & txtSec)
  976.     Else
  977.         PassDate = CDate(txtCurDate)
  978.     End If
  979.     cfWeekNumber = cfRetWeekNumber(PassDate)
  980.     ShowYear = False
  981.     ShowTime = False
  982.     ShowWeeks = False
  983.     cfFirstday = 0
  984. '    iLogOff = cLogOff
  985. '    LogOffTime = LogOffMinutes
  986.     Me.Hide
  987. End Sub
  988. Private Sub cmdYRPrevNext_Click(Index As Integer)
  989.   Dim i As Integer
  990.     i = cmbYear.ListIndex
  991.     Select Case Index
  992.     Case 0
  993.         i = i - 1
  994.         If i < 0 Then i = 0
  995.         cmbYear.ListIndex = i
  996.     Case Else
  997.         i = i + 1
  998.         If i > cmbYear.ListCount - 1 Then i = cmbYear.ListCount - 1
  999.         cmbYear.ListIndex = i
  1000.     End Select
  1001. End Sub
  1002. Private Sub Form_Activate()
  1003.   Dim i As Integer
  1004.     For i = 0 To 6
  1005.         lblWeek(i).Visible = ShowWeeks
  1006.     Next i
  1007.     cmbYear.Enabled = ShowYear
  1008.     cmdYRPrevNext(0).Visible = ShowYear
  1009.     cmdYRPrevNext(1).Visible = ShowYear
  1010.     fraTime.Visible = ShowTime
  1011.     If Not ShowTime Then
  1012.         cmdSelect.Top = fraTime.Top
  1013.         lblDate(42).Top = fraTime.Top
  1014.         Me.Height = 4800
  1015.     End If
  1016. '    iLogOff = cLogOff
  1017. '    LogOffTime = LogOffMinutes
  1018. End Sub
  1019. Private Function RetFirstDayOfYear(Optional tDate As Date = 0) As Variant
  1020.  'Dim tDate As Date
  1021.     If tDate = 0 Then
  1022.         tDate = CDate("1/1/" & Year(PassDate))
  1023.     Else
  1024.         tDate = CDate("1/1/" & Year(tDate))
  1025.     End If
  1026.     If cfFirstWeekDay = 0 Then cfFirstWeekDay = 1
  1027.     If Weekday(tDate) <> cfFirstWeekDay Then
  1028.         Do
  1029.             tDate = tDate - 1
  1030.             If Weekday(tDate) = cfFirstWeekDay Then Exit Do
  1031.         Loop
  1032.     End If
  1033.     '/* Calculate first day of new year */
  1034.     tDate = DateAdd("d", 1, tDate) + 6
  1035.     If Day(tDate) > 6 Then tDate = tDate - 7
  1036.     RetFirstDayOfYear = tDate
  1037. End Function
  1038. Private Sub Form_Deactivate()
  1039.     FormShowing = False
  1040. End Sub
  1041. Private Sub Form_KeyPress(KeyAscii As Integer)
  1042.     If KeyAscii = vbKeyReturn Then
  1043.         PassDate = txtCurDate
  1044.         Me.Hide
  1045.         'Unload Me
  1046.     End If
  1047.     If KeyAscii = vbKeyEscape Then
  1048.         Me.Hide
  1049.         'Unload Me
  1050.     End If
  1051. End Sub
  1052. Private Sub Form_Load()
  1053.  Dim i As Long
  1054.     Me.Move (Screen.Width - Me.Width) / 2, 0.8 * (Screen.Height - Me.Height) / 2
  1055.     If IsEmpty(PassDate) Then PassDate = Now
  1056.     If PassDate = 0 Or Not IsDate(PassDate) Then PassDate = Now
  1057.     If cfFirstday > 0 And IsDate(cfFirstday) Then
  1058.         cfWeekDay = Weekday(cfFirstday)
  1059.         cfPassedFirstDay = True
  1060.     Else
  1061.         cfFirstday = RetFirstDayOfYear
  1062.         cfWeekDay = Weekday(cfFirstday)
  1063.     End If
  1064.     cmbYear.Clear
  1065.     cmbMonth.Clear
  1066.     For i = 1 To 12
  1067.         cmbMonth.AddItem Format$(i & "/1/1998", "mmmm"), i - 1
  1068.     Next
  1069.     For i = 1900 To 2100
  1070.         cmbYear.AddItem i
  1071.         cmbYear.ItemData(cmbYear.NewIndex) = i
  1072.         If i = Year(PassDate) Then cfYearIndex = cmbYear.NewIndex
  1073.     Next i
  1074.     txtHours = (Mid$(Format(PassDate, "hh:mm:ss"), 1, 2))
  1075.     txtMin = (Mid$(Format(PassDate, "hh:mm:ss"), 4, 2))
  1076.     txtSec = (Mid$(Format(PassDate, "hh:mm:ss"), 7, 2))
  1077.     txtCurDate = Format(PassDate, "mm/dd/yyyy")
  1078. End Sub
  1079. Private Sub cfFillDates(ByVal cfCurDate As Date)
  1080.   Dim cfSDate As Date, i As Integer, n As Integer
  1081.     Call cfFindYear(Year(cfCurDate))
  1082. '    cmbMonth.ListIndex = Month(cfCurDate) - 1
  1083.     cfSDate = CDate(Format$(cfCurDate, "mm/1/yyyy"))
  1084.     cfSDate = cfSDate - Weekday(cfSDate) + 1
  1085.     n = cfWeekDay
  1086.     For i = 0 To 6
  1087.         lblDays(i) = cfDayString(n)
  1088.         n = n + 1
  1089.         If n > 7 Then n = 1
  1090.     Next i
  1091.     cfSDate = CDate(Format$(cfCurDate, "mm/1/yyyy"))
  1092.     cfSDate = cfSDate - Weekday(cfSDate, cfWeekDay) + 1
  1093.     For i = 0 To 41
  1094.         lblDate(i).Tag = cfSDate + i
  1095.         lblDate(i).Caption = Format$(cfSDate + i, "d")
  1096.         If CDate(lblDate(i).Tag) = cfCurDate Then
  1097.             lblDate(i).BackColor = &H80000005
  1098.             cfDayIndex = i
  1099.         Else
  1100.             lblDate(i).BackColor = &H8000000F
  1101.         End If
  1102.         If Format(cfCurDate, "mm") <> Format(cfSDate + i, "mm") Then
  1103.             lblDate(i).ForeColor = &HFF&
  1104.         Else
  1105.             lblDate(i).ForeColor = &H0&
  1106.         End If
  1107.         
  1108.         cfFirstday = RetFirstDayOfYear(CDate(txtCurDate))
  1109.         
  1110.         '/* Display Week numbers */
  1111.         If i / 7 = Int(i / 7) Then
  1112.             lblWeek(i / 7).Caption = cfRetWeekNumber(cfSDate + i)
  1113.         End If
  1114.     Next
  1115.     cmbMonth.ListIndex = Month(cfCurDate) - 1
  1116. '    LogOffTime = LogOffMinutes
  1117. End Sub
  1118. Private Function cfRetWeekNumber(ByVal InDate As Date)
  1119.   Dim cftFirstDayOfYear As Variant
  1120.   Dim a As Integer, B As Integer
  1121.     cftFirstDayOfYear = cfFirstday - Weekday(cfFirstday, cfWeekDay) + 1
  1122.     a = DateDiff("ww", cftFirstDayOfYear, InDate - Weekday(InDate, cfWeekDay) + 1) + 1
  1123.     'b = WeeksInAYear(cftFirstDayOfYear)
  1124.     If a = 0 Then a = 52
  1125.     cfRetWeekNumber = a
  1126. End Function
  1127. Private Function WeeksInAYear(Optional ByVal FirstDayOfYear As Variant, _
  1128.                             Optional ByVal CurrentYear As Variant, _
  1129.                             Optional WeekStartsOn As VbDayOfWeek = vbUseSystemDayOfWeek) As Integer
  1130.   Dim tDate As Date
  1131.     If IsMissing(FirstDayOfYear) Then
  1132.         If IsMissing(CurrentYear) Then CurrentYear = Year(Date)
  1133.         FirstDayOfYear = CDate("1/1/" & CurrentYear)
  1134.     Else
  1135.         If WeekStartsOn = vbUseSystemDayOfWeek Then
  1136.             WeekStartsOn = Weekday(FirstDayOfYear)
  1137.         End If
  1138.     End If
  1139.     tDate = DateAdd("yyyy", 1, FirstDayOfYear) + 6
  1140.     If Day(tDate) > 6 Then tDate = tDate - 7
  1141.     WeeksInAYear = DateDiff("w", FirstDayOfYear, tDate, WeekStartsOn)
  1142. End Function
  1143. Private Sub cfFindYear(InYear As Integer)
  1144.  Dim i As Integer
  1145.     For i = 0 To cmbYear.ListCount - 1
  1146.         If cmbYear.ItemData(i) = InYear Then
  1147.             cmbYear.ListIndex = i
  1148.             Exit For
  1149.         End If
  1150.     Next
  1151. End Sub
  1152. Private Sub Form_Unload(Cancel As Integer)
  1153.     Set frmCalendar = Nothing
  1154. End Sub
  1155. Private Sub lblDate_Click(Index As Integer)
  1156.     If Index < 42 Then
  1157.         cfDayIndex = Index
  1158.         txtCurDate = lblDate(Index).Tag
  1159.     Else
  1160.         If ShowYear Or Year(txtCurDate) = Year(Date) Then
  1161.             txtCurDate = Date
  1162.             Call cfFillDates(txtCurDate)
  1163.         End If
  1164.     End If
  1165. End Sub
  1166. Private Sub lblDate_DblClick(Index As Integer)
  1167.     Call cmdSelect_Click
  1168. End Sub
  1169. Private Sub txtCurDate_Change()
  1170.     If IsDate(txtCurDate) Then
  1171.         If ShowYear Then
  1172.             Call cfFillDates(txtCurDate)
  1173.         Else
  1174.             txtCurDate = Format(txtCurDate, "mm/dd/" & Year(PassDate))
  1175.             Call cfFillDates(txtCurDate)
  1176.         End If
  1177.         lblDate(42) = "[Today]   " & Format(CDate(txtCurDate), "dddd - mmmm d, yyyy")
  1178.     End If
  1179. End Sub
  1180. Private Sub txtCurDate_KeyPress(KeyAscii As Integer)
  1181.     KeyAscii = False
  1182. End Sub
  1183. Private Function cfDayString(tDate As Variant) As String
  1184.     Select Case Weekday(tDate)
  1185.     Case 2
  1186.         cfDayString = "Mon"
  1187.     Case 3
  1188.         cfDayString = "Tue"
  1189.     Case 4
  1190.         cfDayString = "Wed"
  1191.     Case 5
  1192.         cfDayString = "Thu"
  1193.     Case 6
  1194.         cfDayString = "Fri"
  1195.     Case 7
  1196.         cfDayString = "Sat"
  1197.     Case 1
  1198.         cfDayString = "Sun"
  1199.     End Select
  1200. End Function
  1201. Private Sub cfFixFirstDay()
  1202.     If Weekday(cfFirstday) <> cfWeekDay Then
  1203.         Do
  1204.             cfFirstday = cfFirstday - 1
  1205.             If Weekday(cfFirstday) = cfWeekDay Then Exit Do
  1206.         Loop
  1207.     End If
  1208. End Sub
  1209.