home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / stpwtch / swexampl.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-02-17  |  26.8 KB  |  840 lines

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
  3. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
  4. Object = "{89A72C4D-C70A-11D2-9158-004033289E7B}#1.0#0"; "StopWtch.ocx"
  5. Begin VB.Form SwExample 
  6.    Caption         =   "AussieSoft Stop Watch component example"
  7.    ClientHeight    =   6825
  8.    ClientLeft      =   60
  9.    ClientTop       =   345
  10.    ClientWidth     =   6150
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   6825
  13.    ScaleWidth      =   6150
  14.    StartUpPosition =   2  'CenterScreen
  15.    Begin StopWatchControl.AusClock AusClock1 
  16.       Height          =   1635
  17.       Left            =   1335
  18.       Top             =   135
  19.       Width           =   1635
  20.       _ExtentX        =   2884
  21.       _ExtentY        =   2884
  22.       MouseIcon       =   "SwExample.frx":0000
  23.       InitialTime     =   ""
  24.       BorderWidth     =   2
  25.       BorderColor     =   -2147483640
  26.       ForeColor       =   -2147483640
  27.       SecWidth        =   1
  28.       MinWidth        =   3
  29.       HourWidth       =   5
  30.       Appearance      =   1
  31.    End
  32.    Begin VB.Frame Frame 
  33.       Height          =   4065
  34.       Index           =   1
  35.       Left            =   1500
  36.       TabIndex        =   9
  37.       Top             =   2400
  38.       Width           =   4095
  39.       Begin VB.Frame Frame2 
  40.          Caption         =   "Display"
  41.          Height          =   585
  42.          Left            =   225
  43.          TabIndex        =   29
  44.          Top             =   165
  45.          Width           =   3510
  46.          Begin VB.OptionButton DisplayOb 
  47.             Caption         =   "Analog"
  48.             Height          =   300
  49.             Index           =   0
  50.             Left            =   165
  51.             TabIndex        =   31
  52.             Top             =   255
  53.             Value           =   -1  'True
  54.             Width           =   945
  55.          End
  56.          Begin VB.OptionButton DisplayOb 
  57.             Caption         =   "Digital"
  58.             Height          =   300
  59.             Index           =   1
  60.             Left            =   1590
  61.             TabIndex        =   30
  62.             Top             =   255
  63.             Width           =   945
  64.          End
  65.       End
  66.       Begin VB.Frame Frame6 
  67.          Caption         =   "Clock mode"
  68.          Height          =   2355
  69.          Left            =   225
  70.          TabIndex        =   15
  71.          Top             =   810
  72.          Width           =   3510
  73.          Begin VB.OptionButton ModeOb 
  74.             Caption         =   "Normal"
  75.             Height          =   225
  76.             Index           =   0
  77.             Left            =   165
  78.             TabIndex        =   27
  79.             Top             =   210
  80.             Value           =   -1  'True
  81.             Width           =   975
  82.          End
  83.          Begin VB.OptionButton ModeOb 
  84.             Caption         =   "Decrement"
  85.             Height          =   225
  86.             Index           =   1
  87.             Left            =   165
  88.             TabIndex        =   26
  89.             Top             =   1515
  90.             Width           =   1245
  91.          End
  92.          Begin VB.TextBox InitTimeTb 
  93.             Height          =   330
  94.             Left            =   1515
  95.             TabIndex        =   25
  96.             Top             =   1680
  97.             Width           =   1080
  98.          End
  99.          Begin VB.CheckBox BellCb 
  100.             Caption         =   "Alert when time expended"
  101.             Height          =   315
  102.             Left            =   420
  103.             TabIndex        =   24
  104.             Top             =   1995
  105.             Value           =   1  'Checked
  106.             Width           =   2160
  107.          End
  108.          Begin VB.CommandButton SetInitialTimePb 
  109.             Caption         =   "Set"
  110.             Height          =   330
  111.             Left            =   2715
  112.             TabIndex        =   23
  113.             Top             =   1680
  114.             Width           =   555
  115.          End
  116.          Begin VB.Frame Frame7 
  117.             Caption         =   "Alert every:"
  118.             Height          =   855
  119.             Left            =   375
  120.             TabIndex        =   16
  121.             Top             =   435
  122.             Width           =   2715
  123.             Begin VB.OptionButton AlertOb 
  124.                Caption         =   "Hour"
  125.                Height          =   270
  126.                Index           =   5
  127.                Left            =   1935
  128.                TabIndex        =   22
  129.                Top             =   495
  130.                Width           =   720
  131.             End
  132.             Begin VB.OptionButton AlertOb 
  133.                Caption         =   "30 min."
  134.                Height          =   270
  135.                Index           =   4
  136.                Left            =   1020
  137.                TabIndex        =   21
  138.                Top             =   495
  139.                Width           =   870
  140.             End
  141.             Begin VB.OptionButton AlertOb 
  142.                Caption         =   "15 min."
  143.                Height          =   270
  144.                Index           =   3
  145.                Left            =   120
  146.                TabIndex        =   20
  147.                Top             =   495
  148.                Width           =   870
  149.             End
  150.             Begin VB.OptionButton AlertOb 
  151.                Caption         =   "5 min."
  152.                Height          =   270
  153.                Index           =   2
  154.                Left            =   1935
  155.                TabIndex        =   19
  156.                Top             =   195
  157.                Width           =   750
  158.             End
  159.             Begin VB.OptionButton AlertOb 
  160.                Caption         =   "1 min."
  161.                Height          =   270
  162.                Index           =   1
  163.                Left            =   1020
  164.                TabIndex        =   18
  165.                Top             =   195
  166.                Value           =   -1  'True
  167.                Width           =   765
  168.             End
  169.             Begin VB.OptionButton AlertOb 
  170.                Caption         =   "No"
  171.                Height          =   270
  172.                Index           =   0
  173.                Left            =   120
  174.                TabIndex        =   17
  175.                Top             =   210
  176.                Width           =   870
  177.             End
  178.          End
  179.          Begin VB.Label Label2 
  180.             Alignment       =   1  'Right Justify
  181.             Caption         =   "Initial time(hh:mm:ss)"
  182.             Height          =   225
  183.             Left            =   1590
  184.             TabIndex        =   28
  185.             Top             =   1425
  186.             Width           =   1515
  187.          End
  188.          Begin VB.Line Line1 
  189.             BorderColor     =   &H00808080&
  190.             Index           =   0
  191.             X1              =   210
  192.             X2              =   3240
  193.             Y1              =   1380
  194.             Y2              =   1380
  195.          End
  196.          Begin VB.Line Line1 
  197.             BorderColor     =   &H00E0E0E0&
  198.             Index           =   1
  199.             X1              =   210
  200.             X2              =   3240
  201.             Y1              =   1395
  202.             Y2              =   1395
  203.          End
  204.       End
  205.       Begin VB.Frame Frame4 
  206.          Caption         =   "Clock border"
  207.          Height          =   675
  208.          Left            =   225
  209.          TabIndex        =   10
  210.          Top             =   3225
  211.          Width           =   3510
  212.          Begin VB.TextBox BorderWidthTb 
  213.             Alignment       =   1  'Right Justify
  214.             Height          =   330
  215.             Left            =   735
  216.             TabIndex        =   13
  217.             Text            =   "1"
  218.             Top             =   255
  219.             Width           =   540
  220.          End
  221.          Begin VB.CommandButton BorderColPb 
  222.             Caption         =   "Color"
  223.             Height          =   315
  224.             Left            =   2460
  225.             TabIndex        =   12
  226.             Top             =   255
  227.             Width           =   825
  228.          End
  229.          Begin VB.CommandButton SetBorderWidthPb 
  230.             Caption         =   "Set"
  231.             Height          =   330
  232.             Left            =   1440
  233.             TabIndex        =   11
  234.             Top             =   255
  235.             Width           =   555
  236.          End
  237.          Begin VB.Label Label1 
  238.             Alignment       =   1  'Right Justify
  239.             Caption         =   "Width"
  240.             Height          =   225
  241.             Index           =   0
  242.             Left            =   75
  243.             TabIndex        =   14
  244.             Top             =   308
  245.             Width           =   540
  246.          End
  247.       End
  248.    End
  249.    Begin VB.Frame Frame 
  250.       Height          =   4065
  251.       Index           =   3
  252.       Left            =   1500
  253.       TabIndex        =   45
  254.       Top             =   2400
  255.       Width           =   4095
  256.       Begin VB.Frame Frame5 
  257.          Caption         =   "Digital accuracy"
  258.          Height          =   675
  259.          Left            =   285
  260.          TabIndex        =   52
  261.          Top             =   390
  262.          Width           =   3660
  263.          Begin VB.OptionButton AccuracyOb 
  264.             Caption         =   "Units"
  265.             Height          =   240
  266.             Index           =   0
  267.             Left            =   165
  268.             TabIndex        =   55
  269.             Top             =   270
  270.             Value           =   -1  'True
  271.             Width           =   780
  272.          End
  273.          Begin VB.OptionButton AccuracyOb 
  274.             Caption         =   "Tenths"
  275.             Height          =   240
  276.             Index           =   1
  277.             Left            =   1125
  278.             TabIndex        =   54
  279.             Top             =   270
  280.             Width           =   885
  281.          End
  282.          Begin VB.OptionButton AccuracyOb 
  283.             Caption         =   "Hundredths"
  284.             Height          =   240
  285.             Index           =   2
  286.             Left            =   2190
  287.             TabIndex        =   53
  288.             Top             =   270
  289.             Width           =   1230
  290.          End
  291.       End
  292.       Begin VB.Frame Frame1 
  293.          Caption         =   "Size"
  294.          Height          =   675
  295.          Left            =   285
  296.          TabIndex        =   46
  297.          Top             =   1215
  298.          Width           =   3660
  299.          Begin VB.TextBox DimTb 
  300.             Height          =   315
  301.             Index           =   2
  302.             Left            =   1005
  303.             TabIndex        =   49
  304.             Top             =   270
  305.             Width           =   465
  306.          End
  307.          Begin VB.TextBox DimTb 
  308.             Height          =   315
  309.             Index           =   3
  310.             Left            =   2400
  311.             TabIndex        =   48
  312.             Top             =   270
  313.             Width           =   465
  314.          End
  315.          Begin VB.CommandButton SetPb 
  316.             Caption         =   "Set"
  317.             Height          =   330
  318.             Index           =   0
  319.             Left            =   2955
  320.             TabIndex        =   47
  321.             Top             =   270
  322.             Width           =   555
  323.          End
  324.          Begin VB.Label Label3 
  325.             Alignment       =   1  'Right Justify
  326.             Caption         =   "Height(mm)"
  327.             Height          =   240
  328.             Index           =   2
  329.             Left            =   60
  330.             TabIndex        =   51
  331.             Top             =   300
  332.             Width           =   810
  333.          End
  334.          Begin VB.Label Label3 
  335.             Alignment       =   1  'Right Justify
  336.             Caption         =   "Width(mm)"
  337.             Height          =   240
  338.             Index           =   3
  339.             Left            =   1515
  340.             TabIndex        =   50
  341.             Top             =   300
  342.             Width           =   810
  343.          End
  344.       End
  345.    End
  346.    Begin VB.Frame Frame 
  347.       Height          =   4065
  348.       Index           =   2
  349.       Left            =   1500
  350.       TabIndex        =   32
  351.       Top             =   2400
  352.       Width           =   4095
  353.       Begin VB.Frame Frame3 
  354.          Caption         =   "Analog face"
  355.          Height          =   2070
  356.          Left            =   195
  357.          TabIndex        =   33
  358.          Top             =   300
  359.          Width           =   3690
  360.          Begin VB.OptionButton FaceOb 
  361.             Caption         =   "Rectangular"
  362.             Height          =   270
  363.             Index           =   0
  364.             Left            =   165
  365.             TabIndex        =   42
  366.             Top             =   285
  367.             Width           =   1350
  368.          End
  369.          Begin VB.OptionButton FaceOb 
  370.             Caption         =   "Oval"
  371.             Height          =   270
  372.             Index           =   1
  373.             Left            =   1965
  374.             TabIndex        =   41
  375.             Top             =   285
  376.             Width           =   780
  377.          End
  378.          Begin VB.OptionButton AppearanceOb 
  379.             Caption         =   "Flat"
  380.             Height          =   270
  381.             Index           =   0
  382.             Left            =   165
  383.             TabIndex        =   40
  384.             Top             =   1110
  385.             Width           =   660
  386.          End
  387.          Begin VB.OptionButton AppearanceOb 
  388.             Caption         =   "Raised"
  389.             Height          =   270
  390.             Index           =   1
  391.             Left            =   945
  392.             TabIndex        =   39
  393.             Top             =   1110
  394.             Width           =   870
  395.          End
  396.          Begin VB.OptionButton AppearanceOb 
  397.             Caption         =   "Lowered"
  398.             Height          =   270
  399.             Index           =   2
  400.             Left            =   1935
  401.             TabIndex        =   38
  402.             Top             =   1110
  403.             Width           =   1140
  404.          End
  405.          Begin VB.CommandButton BgPb 
  406.             Caption         =   "Background color"
  407.             Height          =   315
  408.             Left            =   990
  409.             TabIndex        =   37
  410.             Top             =   1515
  411.             Width           =   1545
  412.          End
  413.          Begin VB.TextBox DimTb 
  414.             Height          =   315
  415.             Index           =   0
  416.             Left            =   975
  417.             TabIndex        =   36
  418.             Top             =   630
  419.             Width           =   465
  420.          End
  421.          Begin VB.TextBox DimTb 
  422.             Height          =   315
  423.             Index           =   1
  424.             Left            =   2415
  425.             TabIndex        =   35
  426.             Top             =   630
  427.             Width           =   465
  428.          End
  429.          Begin VB.CommandButton SetPb 
  430.             Caption         =   "Set"
  431.             Height          =   330
  432.             Index           =   1
  433.             Left            =   3000
  434.             TabIndex        =   34
  435.             Top             =   615
  436.             Width           =   555
  437.          End
  438.          Begin VB.Label Label3 
  439.             Alignment       =   1  'Right Justify
  440.             Caption         =   "Height(mm)"
  441.             Height          =   240
  442.             Index           =   0
  443.             Left            =   60
  444.             TabIndex        =   44
  445.             Top             =   660
  446.             Width           =   810
  447.          End
  448.          Begin VB.Label Label3 
  449.             Alignment       =   1  'Right Justify
  450.             Caption         =   "Width(mm)"
  451.             Height          =   240
  452.             Index           =   1
  453.             Left            =   1530
  454.             TabIndex        =   43
  455.             Top             =   660
  456.             Width           =   810
  457.          End
  458.       End
  459.    End
  460.    Begin VB.CommandButton StartPb 
  461.       Caption         =   "Start clock"
  462.       Height          =   315
  463.       Left            =   4500
  464.       TabIndex        =   7
  465.       Top             =   90
  466.       Width           =   990
  467.    End
  468.    Begin VB.CommandButton LapPb 
  469.       Caption         =   "Lap"
  470.       Enabled         =   0   'False
  471.       Height          =   315
  472.       Left            =   90
  473.       TabIndex        =   6
  474.       Top             =   75
  475.       Width           =   990
  476.    End
  477.    Begin VB.ListBox List1 
  478.       Height          =   1230
  479.       Left            =   90
  480.       MousePointer    =   13  'Arrow and Hourglass
  481.       TabIndex        =   5
  482.       Top             =   510
  483.       Width           =   990
  484.    End
  485.    Begin VB.CommandButton ResetLapsPb 
  486.       Caption         =   "Reset"
  487.       Height          =   315
  488.       Left            =   90
  489.       TabIndex        =   4
  490.       Top             =   1830
  491.       Width           =   990
  492.    End
  493.    Begin VB.CommandButton ResetClockPb 
  494.       Caption         =   "Reset"
  495.       Enabled         =   0   'False
  496.       Height          =   315
  497.       Left            =   4500
  498.       TabIndex        =   3
  499.       Top             =   495
  500.       Width           =   990
  501.    End
  502.    Begin VB.TextBox TimeTb 
  503.       BeginProperty Font 
  504.          Name            =   "MS Sans Serif"
  505.          Size            =   18
  506.          Charset         =   0
  507.          Weight          =   700
  508.          Underline       =   0   'False
  509.          Italic          =   0   'False
  510.          Strikethrough   =   0   'False
  511.       EndProperty
  512.       Height          =   435
  513.       Index           =   0
  514.       Left            =   3285
  515.       TabIndex        =   2
  516.       Text            =   "00:00:00"
  517.       Top             =   1200
  518.       Visible         =   0   'False
  519.       Width           =   1620
  520.    End
  521.    Begin VB.TextBox TimeTb 
  522.       BeginProperty Font 
  523.          Name            =   "MS Sans Serif"
  524.          Size            =   12
  525.          Charset         =   0
  526.          Weight          =   700
  527.          Underline       =   0   'False
  528.          Italic          =   0   'False
  529.          Strikethrough   =   0   'False
  530.       EndProperty
  531.       Height          =   375
  532.       Index           =   1
  533.       Left            =   4905
  534.       TabIndex        =   1
  535.       Text            =   "0"
  536.       Top             =   1260
  537.       Visible         =   0   'False
  538.       Width           =   270
  539.    End
  540.    Begin VB.TextBox TimeTb 
  541.       BeginProperty Font 
  542.          Name            =   "MS Sans Serif"
  543.          Size            =   12
  544.          Charset         =   0
  545.          Weight          =   700
  546.          Underline       =   0   'False
  547.          Italic          =   0   'False
  548.          Strikethrough   =   0   'False
  549.       EndProperty
  550.       Height          =   375
  551.       Index           =   2
  552.       Left            =   5175
  553.       TabIndex        =   0
  554.       Text            =   "0"
  555.       Top             =   1260
  556.       Visible         =   0   'False
  557.       Width           =   255
  558.    End
  559.    Begin MSComDlg.CommonDialog CommDlg 
  560.       Left            =   0
  561.       Top             =   6165
  562.       _ExtentX        =   847
  563.       _ExtentY        =   847
  564.       _Version        =   327681
  565.       CancelError     =   -1  'True
  566.    End
  567.    Begin ComctlLib.TabStrip TabStrip 
  568.       Height          =   4785
  569.       Left            =   1350
  570.       TabIndex        =   8
  571.       Top             =   1890
  572.       Width           =   4380
  573.       _ExtentX        =   7726
  574.       _ExtentY        =   8440
  575.       _Version        =   327682
  576.       BeginProperty Tabs {0713E432-850A-101B-AFC0-4210102A8DA7} 
  577.          NumTabs         =   3
  578.          BeginProperty Tab1 {0713F341-850A-101B-AFC0-4210102A8DA7} 
  579.             Caption         =   "General settings"
  580.             Key             =   ""
  581.             Object.Tag             =   ""
  582.             ImageVarType    =   2
  583.          EndProperty
  584.          BeginProperty Tab2 {0713F341-850A-101B-AFC0-4210102A8DA7} 
  585.             Caption         =   "Analog settings"
  586.             Key             =   ""
  587.             Object.Tag             =   ""
  588.             ImageVarType    =   2
  589.          EndProperty
  590.          BeginProperty Tab3 {0713F341-850A-101B-AFC0-4210102A8DA7} 
  591.             Caption         =   "Digital settings"
  592.             Key             =   ""
  593.             Object.Tag             =   ""
  594.             ImageVarType    =   2
  595.          EndProperty
  596.       EndProperty
  597.    End
  598. Attribute VB_Name = "SwExample"
  599. Attribute VB_GlobalNameSpace = False
  600. Attribute VB_Creatable = False
  601. Attribute VB_PredeclaredId = True
  602. Attribute VB_Exposed = False
  603. Option Explicit
  604. Dim Loading As Boolean
  605. Private Sub AccuracyOb_Click(Index As Integer)
  606. If Loading Then
  607.     Exit Sub
  608. End If
  609. AusClock1.Accuracy = Index
  610. If AusClock1.IgnoreDisplay Then
  611.     Select Case Index
  612.         Case 0
  613.             TimeTb(1).Visible = False
  614.             TimeTb(2).Visible = False
  615.         Case 1
  616.             TimeTb(1).Visible = True
  617.             TimeTb(2).Visible = False
  618.         Case 2
  619.             TimeTb(1).Visible = True
  620.             TimeTb(2).Visible = True
  621.     End Select
  622.     TimeTb(1).Visible = False
  623.     TimeTb(2).Visible = False
  624. End If
  625. End Sub
  626. Private Sub AlertOb_Click(Index As Integer)
  627. Select Case Index
  628.     Case 0
  629.         AusClock1.AlertTime = 0
  630.     Case 1
  631.         AusClock1.AlertTime = 60
  632.     Case 2
  633.         AusClock1.AlertTime = 300
  634.     Case 3
  635.         AusClock1.AlertTime = 900
  636.     Case 4
  637.         AusClock1.AlertTime = 1800
  638.     Case 5
  639.         AusClock1.AlertTime = 3600
  640. End Select
  641. End Sub
  642. Private Sub AppearanceOb_Click(Index As Integer)
  643. If Loading Then
  644.     Exit Sub
  645. End If
  646. AusClock1.Appearance = Index
  647. End Sub
  648. Private Sub AusClock1_Alert()
  649. Dim A As Long, Av As String
  650. Av = App.Path
  651. If Right$(Av, 1) <> "\" Then
  652.     Av = Av & "\"
  653. End If
  654. A = sndPlaySound(Av & "Ding.wav", 1)
  655. End Sub
  656. Private Sub AusClock1_Click()
  657. AusClock1.Refresh
  658. End Sub
  659. Private Sub AusClock1_Notify()
  660. If AusClock1.IgnoreDisplay Then
  661.     TimeTb(0).Text = Format$(AusClock1.Hours, "00") & ":" & Format$(AusClock1.Minutes, "00") & ":" & Format$(AusClock1.Seconds, "00")
  662.     If AusClock1.Accuracy = SwTenths Then
  663.         TimeTb(1).Text = Format$(AusClock1.Tens, "0")
  664.     End If
  665.     If AusClock1.Accuracy = SwHundredths Then
  666.         TimeTb(1).Text = Format$(AusClock1.Tens, "0")
  667.         TimeTb(2).Text = Format$(AusClock1.Hundreds, "0")
  668.     End If
  669. End If
  670. End Sub
  671. Private Sub AusClock1_TimeExpired()
  672. Dim A As Long, Av As String
  673. Av = App.Path
  674. If Right$(Av, 1) <> "\" Then
  675.     Av = Av & "\"
  676. End If
  677. If BellCb.Value = 1 Then
  678.     A = sndPlaySound(Av & "Ding.wav", 1)
  679. End If
  680. TimeTb(1).Text = "0"
  681. TimeTb(2).Text = "0"
  682. MsgBox "Time expired", vbOKOnly + vbInformation
  683. StartPb.Caption = "Start"
  684. StartPb.Enabled = False
  685. ResetClockPb.Enabled = True
  686. End Sub
  687. Private Sub BgPb_Click()
  688. CommDlg.Color = AusClock1.BackGround
  689. CommDlg.Action = 3
  690. If Err = 0 Then
  691.     AusClock1.BackGround = CommDlg.Color
  692. End If
  693. End Sub
  694. Private Sub BorderColPb_Click()
  695. CommDlg.Color = AusClock1.BorderColor
  696. CommDlg.Action = 3
  697. If Err = 0 Then
  698.     AusClock1.BorderColor = CommDlg.Color
  699. End If
  700. End Sub
  701. Private Sub DisplayOb_Click(Index As Integer)
  702. If Loading Then
  703.     Exit Sub
  704. End If
  705. AusClock1.Display = Index
  706. If Index = 0 Then
  707.     AusClock1.Height = Val(DimTb(0).Text) * 56.7
  708.     AusClock1.Width = Val(DimTb(1).Text) * 56.7
  709.     AusClock1.Height = Val(DimTb(2).Text) * 56.7
  710.     AusClock1.Width = Val(DimTb(3).Text) * 56.7
  711. End If
  712. End Sub
  713. Private Sub FaceOb_Click(Index As Integer)
  714. If Loading Then
  715.     Exit Sub
  716. End If
  717. If AusClock1.Display = swAnalog Then
  718.     AusClock1.ClockFace = Index
  719. End If
  720. End Sub
  721. Private Sub Form_Load()
  722. Dim K As Integer
  723. Loading = True
  724. For K = 1 To 3
  725.     Frame(K).Move TabStrip.ClientLeft, TabStrip.ClientTop, TabStrip.ClientWidth, TabStrip.ClientHeight
  726. Frame(1).ZOrder
  727. TimeTb(0).Move 1590, 1245
  728. TimeTb(1).Move 3210, 1305
  729. TimeTb(2).Move 3480, 1305
  730. If AusClock1.IgnoreDisplay Then
  731.     AusClock1.Visible = False
  732.     TimeTb(0).Visible = True
  733.     If AusClock1.Accuracy = SwTenths Then
  734.         TimeTb(1).Visible = True
  735.     End If
  736.     If AusClock1.Accuracy = SwHundredths Then
  737.         TimeTb(1).Visible = True
  738.         TimeTb(2).Visible = True
  739.     End If
  740.     TimeTb(0).Visible = False
  741.     TimeTb(1).Visible = False
  742.     TimeTb(2).Visible = False
  743. End If
  744. InitTimeTb.Text = AusClock1.InitialTime
  745. AppearanceOb(AusClock1.Appearance).Value = True
  746. AccuracyOb(AusClock1.Accuracy) = True
  747. DisplayOb(AusClock1.Display).Value = True
  748. ModeOb(AusClock1.ClockMode).Value = True
  749. FaceOb(AusClock1.ClockFace).Value = True
  750. DimTb(0).Text = Int(AusClock1.Height / 56.7)
  751. DimTb(1).Text = Int(AusClock1.Width / 56.7)
  752. DimTb(2).Text = Int(AusClock1.Height / 56.7)
  753. DimTb(3).Text = Int(AusClock1.Width / 56.7)
  754. BorderWidthTb.Text = Format$(AusClock1.BorderWidth)
  755. CommDlg.Flags = cdlCCPreventFullOpen Or cdlCCRGBInit
  756. For K = 0 To 5
  757.     If AlertOb(K).Value Then
  758.         Exit For
  759.     End If
  760. If K = 6 Then
  761.     AlertOb(0).Value = True
  762.     K = 0
  763. End If
  764. Select Case K
  765.     Case 0
  766.         AusClock1.AlertTime = 0
  767.     Case 1
  768.         AusClock1.AlertTime = 60
  769.     Case 2
  770.         AusClock1.AlertTime = 300
  771.     Case 3
  772.         AusClock1.AlertTime = 900
  773.     Case 4
  774.         AusClock1.AlertTime = 1800
  775.     Case 5
  776.         AusClock1.AlertTime = 3600
  777. End Select
  778. Loading = False
  779. End Sub
  780. Private Sub ModeOb_Click(Index As Integer)
  781. If Loading Then
  782.     Exit Sub
  783. End If
  784. AusClock1.ClockMode = Index
  785. If Index = 1 Then
  786.     TimeTb(0).Text = AusClock1.InitialTime
  787. End If
  788. StartPb.Enabled = True
  789. End Sub
  790. Private Sub ResetClockPb_Click()
  791. If AusClock1.ClockMode = swNormal Then
  792.     AusClock1.ResetClock
  793.     TimeTb(0).Text = "00:00:00"
  794.     TimeTb(1).Text = "0"
  795.     TimeTb(2).Text = "0"
  796.     AusClock1.InitialTime = InitTimeTb.Text
  797.     TimeTb(0).Text = InitTimeTb.Text
  798.     TimeTb(1).Text = "0"
  799.     TimeTb(2).Text = "0"
  800.     StartPb.Enabled = True
  801. End If
  802. StartPb.Caption = "Start clock"
  803. End Sub
  804. Private Sub ResetLapsPb_Click()
  805. List1.Clear
  806. End Sub
  807. Private Sub SetBorderWidthPb_Click()
  808. AusClock1.BorderWidth = Val(BorderWidthTb.Text)
  809. End Sub
  810. Private Sub SetInitialTimePb_Click()
  811. AusClock1.InitialTime = InitTimeTb.Text
  812. End Sub
  813. Private Sub SetPb_Click(Index As Integer)
  814. If AusClock1.Display = swAnalog Then
  815.     AusClock1.Width = Val(DimTb(1).Text) * 56.7
  816.     AusClock1.Height = Val(DimTb(0).Text) * 56.7
  817.     AusClock1.Width = Val(DimTb(3).Text) * 56.7
  818.     AusClock1.Height = Val(DimTb(2).Text) * 56.7
  819. End If
  820. End Sub
  821. Private Sub StartPb_Click()
  822. If StartPb.Caption = "Start clock" Then
  823.     StartPb.Caption = "Stop clock"
  824.     If AusClock1.ClockMode = 0 Then
  825.         LapPb.Enabled = True
  826.     End If
  827.     AusClock1.StartClock
  828.     StartTime = Time
  829.     ResetClockPb.Enabled = False
  830.     StartPb.Caption = "Start clock"
  831.     LapPb.Enabled = False
  832.     AusClock1.StopClock
  833.     FinishTime = Time - StartTime
  834.     ResetClockPb.Enabled = True
  835. End If
  836. End Sub
  837. Private Sub TabStrip_Click()
  838. Frame(TabStrip.SelectedItem.Index).ZOrder
  839. End Sub
  840.