home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l406 / 3.ddi / TIMECARD.FR_ / TIMECARD.bin (.txt)
Encoding:
Visual Basic Form  |  1992-10-21  |  45.0 KB  |  1,246 lines

  1. VERSION 2.00
  2. Begin Form Card 
  3.    Caption         =   "TimeCard"
  4.    ClipControls    =   0   'False
  5.    Height          =   6735
  6.    Icon            =   TIMECARD.FRX:0000
  7.    Left            =   1515
  8.    LinkTopic       =   "Form1"
  9.    MaxButton       =   0   'False
  10.    ScaleHeight     =   6045
  11.    ScaleWidth      =   5265
  12.    Top             =   330
  13.    Width           =   5385
  14.    Begin PictureBox picInClk 
  15.       AutoRedraw      =   -1  'True
  16.       AutoSize        =   -1  'True
  17.       BorderStyle     =   0  'None
  18.       Height          =   330
  19.       Left            =   1680
  20.       Picture         =   TIMECARD.FRX:0302
  21.       ScaleHeight     =   330
  22.       ScaleWidth      =   345
  23.       TabIndex        =   36
  24.       Top             =   240
  25.       Width           =   345
  26.    End
  27.    Begin PictureBox picOutClk 
  28.       AutoRedraw      =   -1  'True
  29.       AutoSize        =   -1  'True
  30.       BorderStyle     =   0  'None
  31.       Height          =   330
  32.       Left            =   3000
  33.       Picture         =   TIMECARD.FRX:0484
  34.       ScaleHeight     =   330
  35.       ScaleWidth      =   345
  36.       TabIndex        =   37
  37.       Top             =   240
  38.       Width           =   345
  39.    End
  40.    Begin PictureBox picCalendar 
  41.       AutoRedraw      =   -1  'True
  42.       AutoSize        =   -1  'True
  43.       BorderStyle     =   0  'None
  44.       Height          =   480
  45.       Left            =   720
  46.       Picture         =   TIMECARD.FRX:0606
  47.       ScaleHeight     =   480
  48.       ScaleWidth      =   480
  49.       TabIndex        =   35
  50.       Top             =   480
  51.       Width           =   480
  52.    End
  53.    Begin PictureBox picIn 
  54.       AutoRedraw      =   -1  'True
  55.       AutoSize        =   -1  'True
  56.       BorderStyle     =   0  'None
  57.       DragIcon        =   TIMECARD.FRX:0908
  58.       DragMode        =   1  'Automatic
  59.       Height          =   480
  60.       Left            =   1920
  61.       Picture         =   TIMECARD.FRX:0C0A
  62.       ScaleHeight     =   480
  63.       ScaleWidth      =   480
  64.       TabIndex        =   33
  65.       Tag             =   "InTime"
  66.       Top             =   480
  67.       Width           =   480
  68.    End
  69.    Begin PictureBox picOut 
  70.       AutoRedraw      =   -1  'True
  71.       AutoSize        =   -1  'True
  72.       BorderStyle     =   0  'None
  73.       DragIcon        =   TIMECARD.FRX:0F0C
  74.       DragMode        =   1  'Automatic
  75.       Height          =   480
  76.       Left            =   3240
  77.       Picture         =   TIMECARD.FRX:120E
  78.       ScaleHeight     =   480
  79.       ScaleWidth      =   480
  80.       TabIndex        =   34
  81.       Tag             =   "OutTime"
  82.       Top             =   480
  83.       Width           =   480
  84.    End
  85.    Begin PictureBox picHours 
  86.       AutoRedraw      =   -1  'True
  87.       AutoSize        =   -1  'True
  88.       BorderStyle     =   0  'None
  89.       Height          =   480
  90.       Left            =   4440
  91.       Picture         =   TIMECARD.FRX:1510
  92.       ScaleHeight     =   480
  93.       ScaleWidth      =   480
  94.       TabIndex        =   38
  95.       Top             =   480
  96.       Width           =   480
  97.    End
  98.    Begin CommandButton cmdPrint 
  99.       Caption         =   "Print Card"
  100.       Height          =   495
  101.       Left            =   240
  102.       TabIndex        =   32
  103.       Top             =   5400
  104.       Width           =   2055
  105.    End
  106.    Begin Image imgPointer 
  107.       Height          =   480
  108.       Left            =   120
  109.       Picture         =   TIMECARD.FRX:1812
  110.       Stretch         =   -1  'True
  111.       Top             =   1080
  112.       Width           =   480
  113.    End
  114.    Begin Label lblTotal 
  115.       Caption         =   "Total Hours"
  116.       FontBold        =   -1  'True
  117.       FontItalic      =   0   'False
  118.       FontName        =   "MS Sans Serif"
  119.       FontSize        =   9.75
  120.       FontStrikethru  =   0   'False
  121.       FontUnderline   =   0   'False
  122.       ForeColor       =   &H00800000&
  123.       Height          =   255
  124.       Left            =   2520
  125.       TabIndex        =   39
  126.       Top             =   4680
  127.       Width           =   2415
  128.    End
  129.    Begin Image imgNotIcon 
  130.       Height          =   480
  131.       Left            =   0
  132.       Picture         =   TIMECARD.FRX:1A8C
  133.       Top             =   0
  134.       Visible         =   0   'False
  135.       Width           =   480
  136.    End
  137.    Begin Label lblOverHrs 
  138.       Alignment       =   1  'Right Justify
  139.       Caption         =   "0.00"
  140.       FontBold        =   -1  'True
  141.       FontItalic      =   0   'False
  142.       FontName        =   "MS Sans Serif"
  143.       FontSize        =   9.75
  144.       FontStrikethru  =   0   'False
  145.       FontUnderline   =   0   'False
  146.       ForeColor       =   &H00800000&
  147.       Height          =   255
  148.       Left            =   4200
  149.       TabIndex        =   31
  150.       Top             =   5520
  151.       Width           =   735
  152.    End
  153.    Begin Label lblRegHrs 
  154.       Alignment       =   1  'Right Justify
  155.       Caption         =   "0.00"
  156.       FontBold        =   -1  'True
  157.       FontItalic      =   0   'False
  158.       FontName        =   "MS Sans Serif"
  159.       FontSize        =   9.75
  160.       FontStrikethru  =   0   'False
  161.       FontUnderline   =   0   'False
  162.       ForeColor       =   &H00800000&
  163.       Height          =   255
  164.       Left            =   4200
  165.       TabIndex        =   30
  166.       Top             =   5040
  167.       Width           =   735
  168.    End
  169.    Begin Label lblOverTotal 
  170.       Caption         =   "Overtime"
  171.       FontBold        =   -1  'True
  172.       FontItalic      =   0   'False
  173.       FontName        =   "MS Sans Serif"
  174.       FontSize        =   9.75
  175.       FontStrikethru  =   0   'False
  176.       FontUnderline   =   0   'False
  177.       ForeColor       =   &H00800000&
  178.       Height          =   255
  179.       Left            =   2640
  180.       TabIndex        =   29
  181.       Top             =   5520
  182.       Width           =   1335
  183.    End
  184.    Begin Label lblRegTotal 
  185.       Caption         =   "Regular"
  186.       FontBold        =   -1  'True
  187.       FontItalic      =   0   'False
  188.       FontName        =   "MS Sans Serif"
  189.       FontSize        =   9.75
  190.       FontStrikethru  =   0   'False
  191.       FontUnderline   =   0   'False
  192.       ForeColor       =   &H00800000&
  193.       Height          =   255
  194.       Left            =   2640
  195.       TabIndex        =   28
  196.       Top             =   5040
  197.       Width           =   1335
  198.    End
  199.    Begin Image imgVaca 
  200.       BorderStyle     =   1  'Fixed Single
  201.       DragIcon        =   TIMECARD.FRX:1D8E
  202.       DragMode        =   1  'Automatic
  203.       Height          =   510
  204.       Left            =   960
  205.       Picture         =   TIMECARD.FRX:2090
  206.       Tag             =   "Vacation"
  207.       Top             =   4680
  208.       Width           =   510
  209.    End
  210.    Begin Image imgSick 
  211.       BorderStyle     =   1  'Fixed Single
  212.       DragIcon        =   TIMECARD.FRX:2392
  213.       DragMode        =   1  'Automatic
  214.       Height          =   510
  215.       Left            =   1680
  216.       Picture         =   TIMECARD.FRX:2694
  217.       Tag             =   "Sick"
  218.       Top             =   4680
  219.       Width           =   510
  220.    End
  221.    Begin Image imgHoliday 
  222.       BorderStyle     =   1  'Fixed Single
  223.       DragIcon        =   TIMECARD.FRX:2996
  224.       DragMode        =   1  'Automatic
  225.       Height          =   510
  226.       Left            =   240
  227.       Picture         =   TIMECARD.FRX:2C98
  228.       Tag             =   "Holiday"
  229.       Top             =   4680
  230.       Width           =   510
  231.    End
  232.    Begin Label lblHours 
  233.       Alignment       =   1  'Right Justify
  234.       FontBold        =   -1  'True
  235.       FontItalic      =   0   'False
  236.       FontName        =   "MS Sans Serif"
  237.       FontSize        =   9.75
  238.       FontStrikethru  =   0   'False
  239.       FontUnderline   =   0   'False
  240.       Height          =   255
  241.       Index           =   6
  242.       Left            =   4200
  243.       TabIndex        =   0
  244.       Top             =   4080
  245.       Width           =   735
  246.    End
  247.    Begin Label lblHours 
  248.       Alignment       =   1  'Right Justify
  249.       FontBold        =   -1  'True
  250.       FontItalic      =   0   'False
  251.       FontName        =   "MS Sans Serif"
  252.       FontSize        =   9.75
  253.       FontStrikethru  =   0   'False
  254.       FontUnderline   =   0   'False
  255.       Height          =   255
  256.       Index           =   5
  257.       Left            =   4200
  258.       TabIndex        =   9
  259.       Top             =   3600
  260.       Width           =   735
  261.    End
  262.    Begin Label lblHours 
  263.       Alignment       =   1  'Right Justify
  264.       FontBold        =   -1  'True
  265.       FontItalic      =   0   'False
  266.       FontName        =   "MS Sans Serif"
  267.       FontSize        =   9.75
  268.       FontStrikethru  =   0   'False
  269.       FontUnderline   =   0   'False
  270.       Height          =   255
  271.       Index           =   4
  272.       Left            =   4200
  273.       TabIndex        =   27
  274.       Top             =   3120
  275.       Width           =   735
  276.    End
  277.    Begin Label lblHours 
  278.       Alignment       =   1  'Right Justify
  279.       FontBold        =   -1  'True
  280.       FontItalic      =   0   'False
  281.       FontName        =   "MS Sans Serif"
  282.       FontSize        =   9.75
  283.       FontStrikethru  =   0   'False
  284.       FontUnderline   =   0   'False
  285.       Height          =   255
  286.       Index           =   3
  287.       Left            =   4200
  288.       TabIndex        =   26
  289.       Top             =   2640
  290.       Width           =   735
  291.    End
  292.    Begin Label lblHours 
  293.       Alignment       =   1  'Right Justify
  294.       FontBold        =   -1  'True
  295.       FontItalic      =   0   'False
  296.       FontName        =   "MS Sans Serif"
  297.       FontSize        =   9.75
  298.       FontStrikethru  =   0   'False
  299.       FontUnderline   =   0   'False
  300.       Height          =   255
  301.       Index           =   2
  302.       Left            =   4200
  303.       TabIndex        =   25
  304.       Top             =   2160
  305.       Width           =   735
  306.    End
  307.    Begin Label lblHours 
  308.       Alignment       =   1  'Right Justify
  309.       FontBold        =   -1  'True
  310.       FontItalic      =   0   'False
  311.       FontName        =   "MS Sans Serif"
  312.       FontSize        =   9.75
  313.       FontStrikethru  =   0   'False
  314.       FontUnderline   =   0   'False
  315.       Height          =   255
  316.       Index           =   1
  317.       Left            =   4200
  318.       TabIndex        =   24
  319.       Top             =   1680
  320.       Width           =   735
  321.    End
  322.    Begin Label lblHours 
  323.       Alignment       =   1  'Right Justify
  324.       FontBold        =   -1  'True
  325.       FontItalic      =   0   'False
  326.       FontName        =   "MS Sans Serif"
  327.       FontSize        =   9.75
  328.       FontStrikethru  =   0   'False
  329.       FontUnderline   =   0   'False
  330.       Height          =   255
  331.       Index           =   0
  332.       Left            =   4200
  333.       TabIndex        =   23
  334.       Top             =   1200
  335.       Width           =   735
  336.    End
  337.    Begin Label lblOutTime 
  338.       Alignment       =   2  'Center
  339.       FontBold        =   -1  'True
  340.       FontItalic      =   0   'False
  341.       FontName        =   "MS Sans Serif"
  342.       FontSize        =   9.75
  343.       FontStrikethru  =   0   'False
  344.       FontUnderline   =   0   'False
  345.       Height          =   255
  346.       Index           =   6
  347.       Left            =   2880
  348.       TabIndex        =   22
  349.       Top             =   4080
  350.       Width           =   1095
  351.    End
  352.    Begin Label lblOutTime 
  353.       Alignment       =   2  'Center
  354.       FontBold        =   -1  'True
  355.       FontItalic      =   0   'False
  356.       FontName        =   "MS Sans Serif"
  357.       FontSize        =   9.75
  358.       FontStrikethru  =   0   'False
  359.       FontUnderline   =   0   'False
  360.       Height          =   255
  361.       Index           =   5
  362.       Left            =   2880
  363.       TabIndex        =   21
  364.       Top             =   3600
  365.       Width           =   1095
  366.    End
  367.    Begin Label lblOutTime 
  368.       Alignment       =   2  'Center
  369.       FontBold        =   -1  'True
  370.       FontItalic      =   0   'False
  371.       FontName        =   "MS Sans Serif"
  372.       FontSize        =   9.75
  373.       FontStrikethru  =   0   'False
  374.       FontUnderline   =   0   'False
  375.       Height          =   255
  376.       Index           =   4
  377.       Left            =   2880
  378.       TabIndex        =   20
  379.       Top             =   3120
  380.       Width           =   1095
  381.    End
  382.    Begin Label lblOutTime 
  383.       Alignment       =   2  'Center
  384.       FontBold        =   -1  'True
  385.       FontItalic      =   0   'False
  386.       FontName        =   "MS Sans Serif"
  387.       FontSize        =   9.75
  388.       FontStrikethru  =   0   'False
  389.       FontUnderline   =   0   'False
  390.       Height          =   255
  391.       Index           =   3
  392.       Left            =   2880
  393.       TabIndex        =   19
  394.       Top             =   2640
  395.       Width           =   1095
  396.    End
  397.    Begin Label lblOutTime 
  398.       Alignment       =   2  'Center
  399.       FontBold        =   -1  'True
  400.       FontItalic      =   0   'False
  401.       FontName        =   "MS Sans Serif"
  402.       FontSize        =   9.75
  403.       FontStrikethru  =   0   'False
  404.       FontUnderline   =   0   'False
  405.       Height          =   255
  406.       Index           =   2
  407.       Left            =   2880
  408.       TabIndex        =   18
  409.       Top             =   2160
  410.       Width           =   1095
  411.    End
  412.    Begin Label lblOutTime 
  413.       Alignment       =   2  'Center
  414.       FontBold        =   -1  'True
  415.       FontItalic      =   0   'False
  416.       FontName        =   "MS Sans Serif"
  417.       FontSize        =   9.75
  418.       FontStrikethru  =   0   'False
  419.       FontUnderline   =   0   'False
  420.       Height          =   255
  421.       Index           =   1
  422.       Left            =   2880
  423.       TabIndex        =   17
  424.       Top             =   1680
  425.       Width           =   1095
  426.    End
  427.    Begin Label lblOutTime 
  428.       Alignment       =   2  'Center
  429.       FontBold        =   -1  'True
  430.       FontItalic      =   0   'False
  431.       FontName        =   "MS Sans Serif"
  432.       FontSize        =   9.75
  433.       FontStrikethru  =   0   'False
  434.       FontUnderline   =   0   'False
  435.       Height          =   255
  436.       Index           =   0
  437.       Left            =   2880
  438.       TabIndex        =   16
  439.       Top             =   1200
  440.       Width           =   1095
  441.    End
  442.    Begin Label lblInTime 
  443.       Alignment       =   2  'Center
  444.       FontBold        =   -1  'True
  445.       FontItalic      =   0   'False
  446.       FontName        =   "MS Sans Serif"
  447.       FontSize        =   9.75
  448.       FontStrikethru  =   0   'False
  449.       FontUnderline   =   0   'False
  450.       Height          =   255
  451.       Index           =   6
  452.       Left            =   1560
  453.       TabIndex        =   15
  454.       Top             =   4080
  455.       Width           =   1095
  456.    End
  457.    Begin Label lblInTime 
  458.       Alignment       =   2  'Center
  459.       FontBold        =   -1  'True
  460.       FontItalic      =   0   'False
  461.       FontName        =   "MS Sans Serif"
  462.       FontSize        =   9.75
  463.       FontStrikethru  =   0   'False
  464.       FontUnderline   =   0   'False
  465.       Height          =   255
  466.       Index           =   5
  467.       Left            =   1560
  468.       TabIndex        =   14
  469.       Top             =   3600
  470.       Width           =   1095
  471.    End
  472.    Begin Label lblInTime 
  473.       Alignment       =   2  'Center
  474.       FontBold        =   -1  'True
  475.       FontItalic      =   0   'False
  476.       FontName        =   "MS Sans Serif"
  477.       FontSize        =   9.75
  478.       FontStrikethru  =   0   'False
  479.       FontUnderline   =   0   'False
  480.       Height          =   255
  481.       Index           =   4
  482.       Left            =   1560
  483.       TabIndex        =   13
  484.       Top             =   3120
  485.       Width           =   1095
  486.    End
  487.    Begin Label lblInTime 
  488.       Alignment       =   2  'Center
  489.       FontBold        =   -1  'True
  490.       FontItalic      =   0   'False
  491.       FontName        =   "MS Sans Serif"
  492.       FontSize        =   9.75
  493.       FontStrikethru  =   0   'False
  494.       FontUnderline   =   0   'False
  495.       Height          =   255
  496.       Index           =   3
  497.       Left            =   1560
  498.       TabIndex        =   12
  499.       Top             =   2640
  500.       Width           =   1095
  501.    End
  502.    Begin Label lblInTime 
  503.       Alignment       =   2  'Center
  504.       FontBold        =   -1  'True
  505.       FontItalic      =   0   'False
  506.       FontName        =   "MS Sans Serif"
  507.       FontSize        =   9.75
  508.       FontStrikethru  =   0   'False
  509.       FontUnderline   =   0   'False
  510.       Height          =   255
  511.       Index           =   2
  512.       Left            =   1560
  513.       TabIndex        =   11
  514.       Top             =   2160
  515.       Width           =   1095
  516.    End
  517.    Begin Label lblInTime 
  518.       Alignment       =   2  'Center
  519.       FontBold        =   -1  'True
  520.       FontItalic      =   0   'False
  521.       FontName        =   "MS Sans Serif"
  522.       FontSize        =   9.75
  523.       FontStrikethru  =   0   'False
  524.       FontUnderline   =   0   'False
  525.       Height          =   255
  526.       Index           =   1
  527.       Left            =   1560
  528.       TabIndex        =   10
  529.       Top             =   1680
  530.       Width           =   1095
  531.    End
  532.    Begin Label lblInTime 
  533.       Alignment       =   2  'Center
  534.       FontBold        =   -1  'True
  535.       FontItalic      =   0   'False
  536.       FontName        =   "MS Sans Serif"
  537.       FontSize        =   9.75
  538.       FontStrikethru  =   0   'False
  539.       FontUnderline   =   0   'False
  540.       Height          =   255
  541.       Index           =   0
  542.       Left            =   1560
  543.       TabIndex        =   8
  544.       Top             =   1200
  545.       Width           =   1095
  546.    End
  547.    Begin Label lblDay 
  548.       Alignment       =   2  'Center
  549.       Caption         =   "MON"
  550.       FontBold        =   -1  'True
  551.       FontItalic      =   0   'False
  552.       FontName        =   "MS Sans Serif"
  553.       FontSize        =   9.75
  554.       FontStrikethru  =   0   'False
  555.       FontUnderline   =   0   'False
  556.       Height          =   300
  557.       Index           =   0
  558.       Left            =   600
  559.       TabIndex        =   1
  560.       Top             =   1200
  561.       Width           =   735
  562.    End
  563.    Begin Label lblDay 
  564.       Alignment       =   2  'Center
  565.       Caption         =   "SUN"
  566.       FontBold        =   -1  'True
  567.       FontItalic      =   0   'False
  568.       FontName        =   "MS Sans Serif"
  569.       FontSize        =   9.75
  570.       FontStrikethru  =   0   'False
  571.       FontUnderline   =   0   'False
  572.       Height          =   300
  573.       Index           =   6
  574.       Left            =   600
  575.       TabIndex        =   7
  576.       Top             =   4080
  577.       Width           =   735
  578.    End
  579.    Begin Label lblDay 
  580.       Alignment       =   2  'Center
  581.       Caption         =   "SAT"
  582.       FontBold        =   -1  'True
  583.       FontItalic      =   0   'False
  584.       FontName        =   "MS Sans Serif"
  585.       FontSize        =   9.75
  586.       FontStrikethru  =   0   'False
  587.       FontUnderline   =   0   'False
  588.       Height          =   300
  589.       Index           =   5
  590.       Left            =   600
  591.       TabIndex        =   6
  592.       Top             =   3600
  593.       Width           =   735
  594.    End
  595.    Begin Label lblDay 
  596.       Alignment       =   2  'Center
  597.       Caption         =   "FRI"
  598.       FontBold        =   -1  'True
  599.       FontItalic      =   0   'False
  600.       FontName        =   "MS Sans Serif"
  601.       FontSize        =   9.75
  602.       FontStrikethru  =   0   'False
  603.       FontUnderline   =   0   'False
  604.       Height          =   300
  605.       Index           =   4
  606.       Left            =   600
  607.       TabIndex        =   5
  608.       Top             =   3120
  609.       Width           =   735
  610.    End
  611.    Begin Label lblDay 
  612.       Alignment       =   2  'Center
  613.       Caption         =   "THU"
  614.       FontBold        =   -1  'True
  615.       FontItalic      =   0   'False
  616.       FontName        =   "MS Sans Serif"
  617.       FontSize        =   9.75
  618.       FontStrikethru  =   0   'False
  619.       FontUnderline   =   0   'False
  620.       Height          =   300
  621.       Index           =   3
  622.       Left            =   600
  623.       TabIndex        =   4
  624.       Top             =   2640
  625.       Width           =   735
  626.    End
  627.    Begin Label lblDay 
  628.       Alignment       =   2  'Center
  629.       Caption         =   "WED"
  630.       FontBold        =   -1  'True
  631.       FontItalic      =   0   'False
  632.       FontName        =   "MS Sans Serif"
  633.       FontSize        =   9.75
  634.       FontStrikethru  =   0   'False
  635.       FontUnderline   =   0   'False
  636.       Height          =   300
  637.       Index           =   2
  638.       Left            =   600
  639.       TabIndex        =   3
  640.       Top             =   2160
  641.       Width           =   735
  642.    End
  643.    Begin Label lblDay 
  644.       Alignment       =   2  'Center
  645.       Caption         =   "TUE"
  646.       FontBold        =   -1  'True
  647.       FontItalic      =   0   'False
  648.       FontName        =   "MS Sans Serif"
  649.       FontSize        =   9.75
  650.       FontStrikethru  =   0   'False
  651.       FontUnderline   =   0   'False
  652.       Height          =   300
  653.       Index           =   1
  654.       Left            =   600
  655.       TabIndex        =   2
  656.       Top             =   1680
  657.       Width           =   735
  658.    End
  659.    Begin Menu mnuOptionsMenu 
  660.       Caption         =   "&Options"
  661.       Begin Menu mnuOptionsNew 
  662.          Caption         =   "&New Card"
  663.       End
  664.       Begin Menu mnuOptionsFont 
  665.          Caption         =   "Select &Font..."
  666.       End
  667.       Begin Menu mnuOptionsSep1 
  668.          Caption         =   "-"
  669.       End
  670.       Begin Menu mnuOptionsHowTo 
  671.          Caption         =   "&Instructions..."
  672.       End
  673.       Begin Menu mnuOptionsDemo 
  674.          Caption         =   "&Demo Data"
  675.       End
  676.       Begin Menu mnuOptionsSep2 
  677.          Caption         =   "-"
  678.       End
  679.       Begin Menu mnuOptionsExit 
  680.          Caption         =   "&Exit"
  681.       End
  682.    End
  683. Option Explicit
  684. ' Variable to track week day
  685. Dim RowFlag
  686. ' Array to track daily (indexes = 0 - 6) and total hours (index = 7).
  687. Dim DailyHrs(8)
  688. ' Array to track clock in time or act as flag to show paid time off.
  689. Dim ClkIn(7, 2)
  690. ' Array to track clock out time.
  691. Dim ClkOut(7, 2)
  692. ' Variable to track total overtime hours.
  693. Dim OvrHrs
  694. ' Shared variable for width of current control.
  695. Dim dX As Single
  696. ' Shared variable for height of current control.
  697. Dim dY As Single
  698. ' X position of current control (left).
  699. Dim cmdX
  700. ' Variable to hold error messages.
  701. Dim ErrMsg$
  702. ' Y position of current control (top).
  703. Dim cmdY
  704. ' Constant to format time in 24 hour with leading zero to calculate hours.
  705. Const HrFormat = "hh:mm"
  706. ' Constant to define threshold # of hours for overtime
  707. Const OTLimit = 40
  708. ' Constant for height of a title bar or menu bar
  709. Const BarHgt = 325
  710. Sub ClearCard ()
  711.     ' Declare local variables.
  712.     Dim DayTotal
  713.     ' Move pointer to Saturday.
  714.     imgPointer.Top = 1080
  715.     RowFlag = 0
  716.     ' For each week day
  717.     For DayTotal = 0 To 6
  718.         ' Clear clock in times.
  719.         ClkIn(DayTotal, 1) = 0
  720.         ClkIn(DayTotal, 0) = 0
  721.         lblInTime(DayTotal) = ""
  722.         ' Clear clock out times.
  723.         ClkOut(DayTotal, 0) = 0
  724.         ClkOut(DayTotal, 1) = 0
  725.         lblOutTime(DayTotal) = ""
  726.         ' Clear thdaily hour totals.
  727.         DailyHrs(DayTotal) = 0
  728.         lblHours(DayTotal) = ""
  729.     ' Get next week day
  730.     Next DayTotal
  731.     ' Update card.
  732.     UpdateTime
  733. End Sub
  734. Sub cmdPrint_Click ()
  735.     PrintFrm Card
  736. End Sub
  737. Sub DrawCmd (cmdCtrl As Control)
  738.     ' Declare local variables.
  739.     Dim capTxt
  740.     ' Save width/height of command button
  741.     dX = cmdCtrl.Width
  742.     dY = cmdCtrl.Height
  743.     ' Save X and Y-coordinates of upper left corner of command button
  744.     cmdX = cmdCtrl.Left
  745.     cmdY = cmdCtrl.Top
  746.     ' Save text inside command button
  747.     capTxt = cmdCtrl.Caption
  748.     ' Set width of lines to draw the button.
  749.     DrawWidth = 2
  750.     ' Move current X and Y-coordinates of Printer object to
  751.     ' upper left corner of command button.
  752.     Printer.CurrentX = cmdX
  753.     Printer.CurrentY = cmdY
  754.     ' Draw a box on Printer object to represent command button.
  755.     ' Use Step method to give height and
  756.     ' width of button as relative coordinates for lower
  757.     ' right corner of button.
  758.     Printer.Line -Step(dX, dY), , B
  759.     ' Move current X and Y-coordinates of the Printer object to
  760.     ' start of caption text. Because caption is centered in the button,
  761.     ' calculate starting coordinates by subtracting width/height of
  762.     ' caption text from width/height of button. Add half
  763.     ' difference in both height and with to upper left corner
  764.     ' coordinates to get starting point of text.
  765.     Printer.CurrentX = cmdX + ((dX - Printer.TextWidth(capTxt)) / 2)
  766.     Printer.CurrentY = cmdY + ((dY - Printer.TextHeight(capTxt)) / 2)
  767.     ' Print caption text from command button on Printer object.
  768.     Printer.Print cmdCtrl.Caption
  769. End Sub
  770. Sub DrawLbl (lblCtrl As Control)
  771.     ' Copy font attributes of label to Printer object.
  772.     Printer.FontBold = lblCtrl.FontBold
  773.     Printer.FontItalic = lblCtrl.FontItalic
  774.     Printer.FontSize = lblCtrl.FontSize
  775.     ' Declare variables for the height/width of label caption.
  776.     Dim TxtHgt
  777.     Dim TxtWid
  778.     ' Save the text height/width of caption font
  779.     TxtHgt = Printer.TextHeight(lblCtrl.Caption)
  780.     TxtWid = Printer.TextWidth(lblCtrl.Caption)
  781.     ' Draw the border, if label has one
  782.     If lblCtrl.BorderStyle = 1 Then
  783.         DrawWidth = 2
  784.         Printer.CurrentX = lblCtrl.Left
  785.         Printer.CurrentY = lblCtrl.Top
  786.         Printer.Line -Step(lblCtrl.Width, lblCtrl.Height), , B
  787.     End If
  788.     ' Set the Y-coordinate of the Printer object.
  789.     Printer.CurrentY = lblCtrl.Top
  790.     ' Set the X-coordinate of the Printer object according to the Alignment
  791.     ' property of the label.
  792.     Select Case lblCtrl.Alignment
  793.         ' If alignment is left
  794.         Case 0
  795.             Printer.CurrentX = lblCtrl.Left
  796.         ' If alignment is right
  797.         Case 1
  798.             Printer.CurrentX = lblCtrl.Left + (lblCtrl.Width - TxtWid)
  799.         ' If alignment is center
  800.         Case 2
  801.             Printer.CurrentX = lblCtrl.Left + ((lblCtrl.Width - TxtWid) / 2)
  802.     End Select
  803.     ' Print caption text.
  804.     Printer.Print lblCtrl.Caption
  805. End Sub
  806. Sub DrawPic (picCtrl As Control)
  807.     ' Declare local variables.
  808.     Dim XRd
  809.     Dim YRd
  810.     Dim PelX
  811.     Dim PelY
  812.     Dim PelC
  813.     ' Declare and initialize screen resolution variables.
  814.     Dim ScrX
  815.     ScrX = Screen.TwipsPerPixelX
  816.     Dim ScrY
  817.     ScrY = Screen.TwipsPerPixelY
  818.     ' Set scale mode in image control to read pixels.
  819.     picCtrl.ScaleMode = 3
  820.     ' For each row of pixels in the source bitmap...
  821.     For YRd = 0 To (picCtrl.ScaleHeight - 1)
  822.         ' Calculate the Y position of the pixel.
  823.         PelY = picCtrl.Top + (YRd * ScrY)
  824.         ' For each pixel in the current row of the source bitmap...
  825.         For XRd = 0 To (picCtrl.ScaleWidth - 1)
  826.             ' Calculate the X position of the pixel.
  827.             PelX = picCtrl.Left + (XRd * ScrX)
  828.             ' Store the pixel color in a local variable.
  829.             PelC = picCtrl.Point(XRd, YRd)
  830.             ' If the current pixel in the source bitmap is white, skip it
  831.             ' to improve the speed of the application.
  832.             If PelC <> QBColor(7) Then
  833.                 ' Read pixel color in source bitmap and paint
  834.                 ' corresponding pixel in target object
  835.                 Printer.Line (PelX, PelY)-Step(ScrX, ScrY), PelC, BF
  836.             End If
  837.         ' Get next pixel.
  838.         Next XRd
  839.         ' Yield processing after each row so app doesn't tie up
  840.         ' system while transferring the bitmap.
  841.         DoEvents
  842.     ' Get next row.
  843.     Next YRd
  844.     ' Return (0, 0) coordinates of the Printer object to where they
  845.     ' were before changing the scale mode.
  846.     SetClientPrintOrigin Card
  847. End Sub
  848. Sub Form_DragOver (Source As Control, X As Single, Y As Single, State As Integer)
  849.     ' When dragging icons, show the universal NOT symbol when
  850.     ' over parts of the form where dropping the icon does nothing.
  851.     Source.DragIcon = imgNotIcon.Picture
  852. End Sub
  853. Sub Form_Load ()
  854.     ' Position the form in the middle of the screen.
  855.     Card.Left = (Screen.Width - Card.Width) / 2
  856.     Card.Top = (Screen.Height - Card.Height) / 2
  857.     ' Initialize the day of week selection to Monday when you start
  858.     ' the time card.
  859.     RowFlag = 0
  860. End Sub
  861. Sub Form_Paint ()
  862.     DrawWidth = 2
  863.     ' Draw vertical line between weekday and clock in times.
  864.     Line (1450, 360)-Step(0, 4040), QBColor(8)
  865.     ' Draw vertical line between clock out time and daily total hours.
  866.     Line (4090, 360)-Step(0, 4040), QBColor(8)
  867.     ' Draw box around total regular and overtime hours.
  868.     Line (2500, 4950)-Step(2532, 922), QBColor(8), B
  869. End Sub
  870. Sub Form_Resize ()
  871.     ' As long as the card is not minimized.
  872.     If Card.WindowState = 0 Then
  873.         ' Keep the height and width constant while displaying
  874.         ' a border that looks resizable.
  875.         Card.Height = 6735
  876.         Card.Width = 5370
  877.     End If
  878. End Sub
  879. Sub Form_Unload (Cancel As Integer)
  880.     End
  881. End Sub
  882. Sub lblDay_Click (Index As Integer)
  883.     ' Move pointer to selected day.
  884.     imgPointer.Top = 1080 + (480 * Index)
  885.     ' Set variable to track day of week to index of selected label.
  886.     RowFlag = Index
  887. End Sub
  888. Sub lblDay_DragOver (Index As Integer, Source As Control, X As Single, Y As Single, State As Integer)
  889.     ' When dragging icons, show the NOT symbol since you cannot drop here.
  890.     Source.DragIcon = imgNotIcon.Picture
  891. End Sub
  892. Sub lblInTime_DragDrop (Index As Integer, Source As Control, X As Single, Y As Single)
  893.     ' Declare local variables.
  894.     Dim InTime
  895.     ' If this row is the selected day of week...
  896.     If Index = RowFlag Then
  897.         ' If this row already has a time entry...
  898.         If lblInTime(Index).Caption <> "" Then
  899.             ' Prepare and display error message.
  900.             ErrMsg$ = "You need supervisor authority to change a time entry."
  901.             MsgBox ErrMsg$, 0, "TimeCard Error"
  902.             ' Abort procedure
  903.             Exit Sub
  904.         End If
  905.         ' Identify icon you're dropping with Tag property.
  906.         Select Case Source.Tag
  907.         ' If this is the clock in icon...
  908.         Case "InTime"
  909.             ' Store the clock in time. Subtract integer/date information.
  910.             InTime = Now - Int(Now)
  911.             ' Format and display clock in time using selected display
  912.             lblInTime(Index).Caption = Format$(InTime, "Medium Time")
  913.             ' Store current time in clock in array: hour in 1st element
  914.             ' and minutes in 2nd element.
  915.             ClkIn(Index, 0) = Val(Left$(Format$(InTime, HrFormat), 2))
  916.             ClkIn(Index, 1) = Val(Right$(Format$(InTime, HrFormat), 2))
  917.             ' If clock out icon...
  918.         Case "OutTime"
  919.             ' Prepare and display error message.
  920.             ErrMsg$ = "You dropped the Out picture on the In column. Try again with the In picture."
  921.             MsgBox ErrMsg$, 0, "TimeCard Error"
  922.         ' If holiday icon...
  923.         Case "Holiday"
  924.             ' Display "Holiday" instead of clock in time
  925.             lblInTime(Index).Caption = "Holiday"
  926.             ' Don't display anything for the time clocked out.
  927.             lblOutTime(Index).Caption = " "
  928.             ' Set time clocked in as negative value to signal
  929.             ' day is paid time off, not hours paid
  930.             ClkIn(Index, 0) = -1
  931.         ' If this is the sick time icon...
  932.         Case "Sick"
  933.             ' Display "Sick" instead of clock in time
  934.             lblInTime(Index).Caption = "Sick"
  935.             ' Don't display anything for the time clocked out.
  936.             lblOutTime(Index).Caption = " "
  937.             ' Set time clocked in as negative value to signal
  938.             ' day is paid time off, not hours paid
  939.             ClkIn(Index, 0) = -1
  940.         ' If this is the vacation icon...
  941.         Case "Vacation"
  942.             ' Display "Vacation" instead of clock in time
  943.             lblInTime(Index).Caption = "Vacation"
  944.             ' Don't display anything for the time clocked out.
  945.             lblOutTime(Index).Caption = " "
  946.             ' Set time clocked in as negative value to signal
  947.             ' day is paid time off, not hours paid
  948.             ClkIn(Index, 0) = -1
  949.         End Select
  950.         ' If this day is paid time off, update daily and weekly time totals
  951.         If ClkIn(Index, 0) = -1 Then
  952.             UpdateTime
  953.         End If
  954.     End If
  955. End Sub
  956. Sub lblInTime_DragOver (Index As Integer, Source As Control, X As Single, Y As Single, State As Integer)
  957.     ' If this row isn't the row you selected...
  958.     If Index <> RowFlag Then
  959.         ' Display the NOT symbol to show you can't drop here.
  960.         Source.DragIcon = imgNotIcon.Picture
  961.     ' Otherwise, show the icon itself to show you can drop here.
  962.     Else Source.DragIcon = Source.Picture
  963.     End If
  964. End Sub
  965. Sub lblOutTime_DragDrop (Index As Integer, Source As Control, X As Single, Y As Single)
  966.     ' Declare local variables.
  967.     Dim OutTime
  968.     ' If this row is the selected day of week...
  969.     If Index = RowFlag Then
  970.         ' If this row already has a time entry...
  971.         If lblOutTime(Index).Caption <> "" Then
  972.             ' Prepare and display error message.
  973.             ErrMsg$ = "You need supervisor authority to change a time entry."
  974.             MsgBox ErrMsg$, 0, "TimeCard Error"
  975.             ' Abort procedure
  976.             Exit Sub
  977.         End If
  978.         ' Identify icon by Tag property.
  979.         Select Case Source.Tag
  980.         ' If this is the clock in icon...
  981.         Case "InTime"
  982.             ' Prepare and display error message.
  983.             ErrMsg$ = "You dropped the In picture on the Out column. Try again with the Out picture."
  984.             MsgBox ErrMsg$, 0, "TimeCard Error"
  985.         ' If this is the clock out icon...
  986.         Case "OutTime"
  987.             ' If there is no clock in time for this day...
  988.             If lblInTime(Index).Caption = "" Then
  989.                 ' Prepare and display error message.
  990.                 ErrMsg$ = "You must clock in before you can clock out."
  991.                 MsgBox ErrMsg$, 0, "TimeCard Error"
  992.                 ' Abort procedure.
  993.                 Exit Sub
  994.             End If
  995.             ' Store clock in time. Subtract the integer/date information.
  996.             OutTime = Now - Int(Now)
  997.             ' Format clock out time using selected
  998.             ' display format. Show time on time card.
  999.             lblOutTime(Index).Caption = Format$(OutTime, "Medium Time")
  1000.             ' Store the current time in array with hour in 1st element
  1001.             ' and minutes in 2nd element.
  1002.             ClkOut(Index, 0) = Val(Left$(Format$(OutTime, HrFormat), 2))
  1003.             ClkOut(Index, 1) = Val(Right$(Format$(OutTime, HrFormat), 2))
  1004.         Case "Holiday"
  1005.             ' Display "Holiday" instead of clock in time
  1006.             lblInTime(Index).Caption = "Holiday"
  1007.             ' Don't display anything for time clocked out.
  1008.             lblOutTime(Index).Caption = " "
  1009.             ' Set time clocked in as a negative value to signal
  1010.             ' day is paid time off, not paid hours
  1011.             ClkIn(Index, 0) = -1
  1012.         ' If this sick time icon...
  1013.         Case "Sick"
  1014.             ' Display "Sick" instead of the time clocked in.
  1015.             lblInTime(Index).Caption = "Sick"
  1016.             ' Don't display anything for the time clocked out.
  1017.             lblOutTime(Index).Caption = " "
  1018.             ' Set time clocked in as a negative value to signal
  1019.             ' day is paid time off, not paid hours
  1020.             ClkIn(Index, 0) = -1
  1021.         ' If vacation icon...
  1022.         Case "Vacation"
  1023.             ' Display "Vacation" instead of time clocked in.
  1024.             lblInTime(Index).Caption = "Vacation"
  1025.             ' Don't display anything for the time clocked out.
  1026.             lblOutTime(Index).Caption = " "
  1027.             ' Set time clocked in as a negative value to signal
  1028.             ' day is paid time off, not paid hours
  1029.             ClkIn(Index, 0) = -1
  1030.         End Select
  1031.         ' Updates daily and weekly time totals.
  1032.         UpdateTime
  1033.     End If
  1034. End Sub
  1035. Sub lblOutTime_DragOver (Index As Integer, Source As Control, X As Single, Y As Single, State As Integer)
  1036.     ' If this row isn't the row you selected...
  1037.     If Index <> RowFlag Then
  1038.         ' Display the NOT symbol to show you can't drop here.
  1039.         Source.DragIcon = imgNotIcon.Picture
  1040.     ' Otherwise, show the icon itself to show you can drop here.
  1041.     Else Source.DragIcon = Source.Picture
  1042.     End If
  1043. End Sub
  1044. Sub LinesOnPrinter ()
  1045.     DrawWidth = 2
  1046.     ' Draw vertical line between weekday and clock in times.
  1047.     Printer.Line (1450, 360)-Step(0, 4040), QBColor(0)
  1048.     ' Draw vertical line between clock out time and daily total hours.
  1049.     Printer.Line (4090, 360)-Step(0, 4040), QBColor(0)
  1050.     ' Draw box around total regular and overtime hours.
  1051.     Printer.Line (2500, 4950)-Step(2532, 922), QBColor(0), B
  1052. End Sub
  1053. Sub mnuOptionsDemo_Click ()
  1054.     ' Declare local variables.
  1055.     Static InDemo(7)
  1056.     Static OutDemo(7)
  1057.     Dim X
  1058.     ' Wipe out current card.
  1059.     ClearCard
  1060.     ' Populate InDemo array with demo clock in times.
  1061.     InDemo(0) = .406435185184819
  1062.     InDemo(1) = 0
  1063.     InDemo(2) = .580219907409628
  1064.     InDemo(3) = .395891203705105
  1065.     InDemo(4) = .583842592590372
  1066.     InDemo(5) = .460798611107748
  1067.     ' Populate OutDemo array with demo clock out times.
  1068.     OutDemo(0) = .729641203703068
  1069.     OutDemo(1) = 0
  1070.     OutDemo(2) = .923842592594156
  1071.     OutDemo(3) = .740092592590372
  1072.     OutDemo(4) = .901099537033588
  1073.     OutDemo(5) = .661296296297233
  1074.     ' Move the pointer to Saturday.
  1075.     imgPointer.Top = 3480
  1076.     RowFlag = 5
  1077.     ' Display the clock in and out times.
  1078.     For X = 0 To 5
  1079.         ' Format and show clock in/out times using selected display format
  1080.         lblInTime(X).Caption = Format$(InDemo(X), "Medium Time")
  1081.         lblOutTime(X).Caption = Format$(OutDemo(X), "Medium Time")
  1082.         ' Store current time in array.
  1083.         ' Place hour in 1st element and minutes in 2nd element.
  1084.         ClkIn(X, 0) = Val(Left$(Format$(InDemo(X), HrFormat), 2))
  1085.         ClkIn(X, 1) = Val(Right$(Format$(InDemo(X), HrFormat), 2))
  1086.         ClkOut(X, 0) = Val(Left$(Format$(OutDemo(X), HrFormat), 2))
  1087.         ClkOut(X, 1) = Val(Right$(Format$(OutDemo(X), HrFormat), 2))
  1088.     Next X
  1089.     ' Reset Tuesday to show a Holiday.
  1090.     lblInTime(1).Caption = "Holiday"
  1091.     lblOutTime(1).Caption = ""
  1092.     ClkIn(1, 0) = -1
  1093.     ' Update card with daily and weekly hour totals.
  1094.     UpdateTime
  1095. End Sub
  1096. Sub mnuOptionsExit_Click ()
  1097.     ' Remove font selection dialog box from memory.
  1098.     Unload FontDialog
  1099.     ' Exit application.
  1100.     End
  1101. End Sub
  1102. Sub mnuOptionsFont_Click ()
  1103.     ' Show Select Fonts dialog as modal.
  1104.     FontDialog.Show 1
  1105. End Sub
  1106. Sub mnuOptionsHowTo_Click ()
  1107.     Dim HowTo
  1108.     Dim NL
  1109.     NL = Chr$(13) & Chr$(10) & Chr$(13) & Chr$(10)
  1110.     HowTo = "Click on day of week to select day." & NL
  1111.     HowTo = HowTo & "Drag Clock In icon onto In column beside selected day to clock in." & NL
  1112.     HowTo = HowTo & "Drag Clock Out icon onto Out column beside selected day to clock out." & NL
  1113.     HowTo = HowTo & "Drag Holiday, Vacation, or Sick icons onto In or Out columns for paid time off." & NL
  1114.     HowTo = HowTo & "Click Print Card button to print a copy of the time card."
  1115.     MsgBox HowTo, 64, "TimeCard Instructions"
  1116. End Sub
  1117. Sub mnuOptionsNew_Click ()
  1118.     ' Wipe current card clean.
  1119.     ClearCard
  1120. End Sub
  1121. Sub PrintFrm (PFrm As Form)
  1122.     ' Declare local variables.
  1123.     Dim CtlCnt
  1124.     ' Change the mouse pointer to the hourglass.
  1125.     PFrm.MousePointer = 11
  1126.     ' Set the font size for the Printer object.
  1127.     Printer.FontSize = 8.25
  1128.     ' Move the (0, 0) coordinates of the Printer object to center the
  1129.     ' form in the page.
  1130.     Printer.ScaleLeft = -((Printer.Width - PFrm.Width) / 2)
  1131.     Printer.ScaleTop = -((Printer.Height - PFrm.Height) / 2)
  1132.     ' Draw a box that represents the outline of the form.
  1133.     DrawWidth = 2
  1134.     Printer.Line (0, 0)-Step(PFrm.Width, PFrm.Height), , B
  1135.     ' Print Title bar on Printer object.
  1136.     Printer.Line (0, BarHgt)-Step(PFrm.Width, 0)
  1137.     Printer.CurrentX = (PFrm.Width - Printer.TextWidth("TimeCard")) / 2
  1138.     Printer.CurrentY = (BarHgt - Printer.TextHeight("TimeCard")) / 2
  1139.     Printer.Print "TimeCard"
  1140.     ' Move the (0, 0) coordinates of the Printer object so that it
  1141.     ' coincides with the (0, 0) coordinates of the form's client area
  1142.     ' by moving down a distance equal to the height of the Title bar
  1143.     ' and the Menu bar.
  1144.     SetClientPrintOrigin Card
  1145.     ' Use the Line method to redraw the lines and boxes displayed on the
  1146.     ' form on the Printer object.
  1147.     LinesOnPrinter
  1148.     ' Find and print the following controls if they are on the form...
  1149.     For CtlCnt = 0 To PFrm.Controls.Count - 1
  1150.         ' If command button...
  1151.         If TypeOf PFrm.Controls(CtlCnt) Is CommandButton Then
  1152.             DrawCmd PFrm.Controls(CtlCnt)
  1153.         ' If image control...
  1154.         ElseIf TypeOf PFrm.Controls(CtlCnt) Is PictureBox Then
  1155.             DrawPic PFrm.Controls(CtlCnt)
  1156.         ' If label...
  1157.         ElseIf TypeOf PFrm.Controls(CtlCnt) Is Label Then
  1158.             DrawLbl PFrm.Controls(CtlCnt)
  1159.         End If
  1160.     Next CtlCnt
  1161.     ' Send contents of Printer object to printer.
  1162.     Printer.EndDoc
  1163.     ' Change the mouse pointer back to default.
  1164.     PFrm.MousePointer = 0
  1165. End Sub
  1166. Sub SetClientPrintOrigin (PFrm As Form)
  1167.     ' Move the (0, 0) coordinates of the Printer object so that it
  1168.     ' coincides with the (0, 0) coordinates of the form's client area
  1169.     ' centered in the page.
  1170.     Printer.ScaleLeft = -((Printer.Width - PFrm.Width) / 2)
  1171.     Printer.ScaleTop = -((Printer.Height - PFrm.Height) / 2) - (2 * BarHgt)
  1172. End Sub
  1173. Sub UpdateTime ()
  1174.     ' Declare local variables.
  1175.     Dim DayTotal
  1176.     Dim NoOutFlag
  1177.     ' Reset total time for the week to 0 then recalculate from current
  1178.     ' daily totals.
  1179.     DailyHrs(7) = 0
  1180.     ' Reset total overtime hours to 0 then recalculate from new total time.
  1181.     OvrHrs = 0
  1182.     ' For each of the seven days of the week.
  1183.     For DayTotal = 0 To 6
  1184.         ' Initialize flag that signals day with clock in but no clock out.
  1185.         NoOutFlag = False
  1186.         ' Check to see if the day is time off with pay or paid time.
  1187.         Select Case ClkIn(DayTotal, 0)
  1188.             ' If the day is paid time... (if ClkIn has a non-negative
  1189.             ' value then it was set to remember when you clock in).
  1190.             Case Is > 0
  1191.                 ' Check to see if there is a clock out time for the same day.
  1192.                 If ClkOut(DayTotal, 1) = 0 Then
  1193.                     NoOutFlag = True
  1194.                 End If
  1195.                 ' If the minutes of the clock out time are less than the minutes
  1196.                 ' minutes of the clock in time (assuming there is a clock out time).
  1197.                 If ClkOut(DayTotal, 1) <= ClkIn(DayTotal, 1) And NoOutFlag = False Then
  1198.                     ' Subtract one hour from the hours of the clock out time.
  1199.                     ClkOut(DayTotal, 0) = ClkOut(DayTotal, 0) - 1
  1200.                     ' Add 60 minutes to the minutes of the clock in time.
  1201.                     ClkOut(DayTotal, 1) = ClkOut(DayTotal, 1) + 60
  1202.                     ' Hours worked that day equals clock out less clock in time.
  1203.                     DailyHrs(DayTotal) = (ClkOut(DayTotal, 0) - ClkIn(DayTotal, 0)) + ((ClkOut(DayTotal, 1) - ClkIn(DayTotal, 1)) / 60)
  1204.                 ElseIf ClkOut(DayTotal, 1) > ClkIn(DayTotal, 1) And NoOutFlag = False Then
  1205.                     ' Hours worked that day equals clock out less clock in time.
  1206.                     DailyHrs(DayTotal) = (ClkOut(DayTotal, 0) - ClkIn(DayTotal, 0)) + ((ClkOut(DayTotal, 1) - ClkIn(DayTotal, 1)) / 60)
  1207.                 ElseIf NoOutFlag = True Then
  1208.                     ' Display "Error" in clock out labels missing a time.
  1209.                     lblOutTime(DayTotal).Caption = "Error"
  1210.                     ' Set hours worked for the day to zero.
  1211.                     DailyHrs(DayTotal) = 0
  1212.                     ' Prepare an error message.
  1213.                     ErrMsg$ = "You have forgotten to clock out on at least one day."
  1214.                     ' Display the error message.
  1215.                     MsgBox ErrMsg$, 0, "TimeCard Error"
  1216.                 End If
  1217.             ' If the day is time off with pay... (if ClkIn has a negative
  1218.             ' value then it was set as a flag for sick/holiday/vacation pay)
  1219.             Case Is < 0
  1220.                 ' Total hours equal 8 hours paid time off
  1221.                 DailyHrs(DayTotal) = 8
  1222.         End Select
  1223.         ' Display the total hours for the day on the time card
  1224.         If DailyHrs(DayTotal) >= 0 And ClkIn(DayTotal, 0) <> 0 Then
  1225.             lblHours(DayTotal).Caption = Format$(DailyHrs(DayTotal), "#0.00")
  1226.         End If
  1227.         ' Total time for the week is the sum of all the daily totals
  1228.         DailyHrs(7) = DailyHrs(7) + DailyHrs(DayTotal)
  1229.     ' Get the next day of the week
  1230.     Next DayTotal
  1231.     ' If total time for the week is over the overtime limit (set by the
  1232.     ' OTLimit constant)
  1233.     If DailyHrs(7) > OTLimit Then
  1234.         ' Overtime hours equal total time for the week less the overtime
  1235.         ' limit
  1236.         OvrHrs = DailyHrs(7) - OTLimit
  1237.         ' Total regular hours for the week now set to the overtime limit
  1238.         DailyHrs(7) = OTLimit
  1239.     End If
  1240.     ' Display the total regular hours for the week at the bottom of the
  1241.     ' time card
  1242.     lblRegHrs.Caption = Format$(DailyHrs(7), "#0.00")
  1243.     ' Display any overtime hours at the bottom of the time card
  1244.     lblOverHrs.Caption = Format$(OvrHrs, "#0.00")
  1245. End Sub
  1246.