home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l405 / 1.ddi / TIMECARD.FR_ / TIMECARD.bin (.txt)
Encoding:
Visual Basic Form  |  1993-04-28  |  45.1 KB  |  1,250 lines

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