home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / digipa_1 / frmmain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-08-04  |  5.1 KB  |  171 lines

  1. VERSION 5.00
  2. Object = "{880C334D-0D3E-11D2-A3D9-EDF746011E28}#1.0#0"; "DIGIPAK1.OCX"
  3. Begin VB.Form frmMain 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Clock example using DigiPAK1"
  6.    ClientHeight    =   855
  7.    ClientLeft      =   4545
  8.    ClientTop       =   3555
  9.    ClientWidth     =   3735
  10.    ClipControls    =   0   'False
  11.    ControlBox      =   0   'False
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   855
  16.    ScaleWidth      =   3735
  17.    Begin VB.CommandButton Command1 
  18.       Caption         =   "&Close"
  19.       BeginProperty Font 
  20.          Name            =   "Tahoma"
  21.          Size            =   8.25
  22.          Charset         =   0
  23.          Weight          =   400
  24.          Underline       =   0   'False
  25.          Italic          =   0   'False
  26.          Strikethrough   =   0   'False
  27.       EndProperty
  28.       Height          =   375
  29.       Left            =   2880
  30.       TabIndex        =   3
  31.       Top             =   120
  32.       Width           =   735
  33.    End
  34.    Begin VB.Timer Timer1 
  35.       Interval        =   250
  36.       Left            =   2280
  37.       Top             =   120
  38.    End
  39.    Begin DigiPAK1.DigiLED DigiLED6 
  40.       Height          =   480
  41.       Left            =   1800
  42.       Top             =   120
  43.       Width           =   285
  44.       _ExtentX        =   503
  45.       _ExtentY        =   847
  46.       SegmentsColor   =   192
  47.    End
  48.    Begin DigiPAK1.DigiLED DigiLED5 
  49.       Height          =   480
  50.       Left            =   1560
  51.       Top             =   120
  52.       Width           =   285
  53.       _ExtentX        =   503
  54.       _ExtentY        =   847
  55.       SegmentsColor   =   192
  56.    End
  57.    Begin DigiPAK1.DigiLED DigiLED4 
  58.       Height          =   480
  59.       Left            =   1080
  60.       Top             =   120
  61.       Width           =   285
  62.       _ExtentX        =   503
  63.       _ExtentY        =   847
  64.       SegmentsColor   =   12632064
  65.    End
  66.    Begin DigiPAK1.DigiLED DigiLED3 
  67.       Height          =   480
  68.       Left            =   840
  69.       Top             =   120
  70.       Width           =   285
  71.       _ExtentX        =   503
  72.       _ExtentY        =   847
  73.       SegmentsColor   =   12632064
  74.    End
  75.    Begin DigiPAK1.DigiLED DigiLED2 
  76.       Height          =   480
  77.       Left            =   360
  78.       Top             =   120
  79.       Width           =   285
  80.       _ExtentX        =   503
  81.       _ExtentY        =   847
  82.    End
  83.    Begin DigiPAK1.DigiLED DigiLED1 
  84.       Height          =   480
  85.       Left            =   120
  86.       Top             =   120
  87.       Width           =   285
  88.       _ExtentX        =   503
  89.       _ExtentY        =   847
  90.    End
  91.    Begin VB.Label Label3 
  92.       AutoSize        =   -1  'True
  93.       BackStyle       =   0  'Transparent
  94.       Caption         =   "Seconds"
  95.       BeginProperty Font 
  96.          Name            =   "Tahoma"
  97.          Size            =   8.25
  98.          Charset         =   0
  99.          Weight          =   400
  100.          Underline       =   0   'False
  101.          Italic          =   0   'False
  102.          Strikethrough   =   0   'False
  103.       EndProperty
  104.       Height          =   195
  105.       Left            =   1560
  106.       TabIndex        =   2
  107.       Top             =   600
  108.       Width           =   600
  109.    End
  110.    Begin VB.Label Label2 
  111.       AutoSize        =   -1  'True
  112.       BackStyle       =   0  'Transparent
  113.       Caption         =   "Minutes"
  114.       BeginProperty Font 
  115.          Name            =   "Tahoma"
  116.          Size            =   8.25
  117.          Charset         =   0
  118.          Weight          =   400
  119.          Underline       =   0   'False
  120.          Italic          =   0   'False
  121.          Strikethrough   =   0   'False
  122.       EndProperty
  123.       Height          =   195
  124.       Left            =   840
  125.       TabIndex        =   1
  126.       Top             =   600
  127.       Width           =   555
  128.    End
  129.    Begin VB.Label Label1 
  130.       AutoSize        =   -1  'True
  131.       BackStyle       =   0  'Transparent
  132.       Caption         =   "Hours"
  133.       BeginProperty Font 
  134.          Name            =   "Tahoma"
  135.          Size            =   8.25
  136.          Charset         =   0
  137.          Weight          =   400
  138.          Underline       =   0   'False
  139.          Italic          =   0   'False
  140.          Strikethrough   =   0   'False
  141.       EndProperty
  142.       Height          =   195
  143.       Left            =   120
  144.       TabIndex        =   0
  145.       Top             =   600
  146.       Width           =   420
  147.    End
  148. Attribute VB_Name = "frmMain"
  149. Attribute VB_GlobalNameSpace = False
  150. Attribute VB_Creatable = False
  151. Attribute VB_PredeclaredId = True
  152. Attribute VB_Exposed = False
  153. Option Explicit
  154. Private Sub Command1_Click()
  155.     Unload Me
  156. End Sub
  157. Private Sub Form_Load()
  158.     Call Timer1_Timer
  159. End Sub
  160. Private Sub Timer1_Timer()
  161.     Dim hora As String
  162.     hora = Format(Now, "hh:mm:ss")
  163.         
  164.     DigiLED1.Value = Mid(hora, 1, 1)
  165.     DigiLED2.Value = Mid(hora, 2, 1)
  166.     DigiLED3.Value = Mid(hora, 4, 1)
  167.     DigiLED4.Value = Mid(hora, 5, 1)
  168.     DigiLED5.Value = Mid(hora, 7, 1)
  169.     DigiLED6.Value = Mid(hora, 8, 1)
  170. End Sub
  171.