home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Power Pack / Visual_Basic4_Power_Pack.bin / vb4files / oledsrvr / srvrtimr.frm (.txt) < prev   
Encoding:
Visual Basic Form  |  1996-11-20  |  1.8 KB  |  64 lines

  1. VERSION 4.00
  2. Begin VB.Form frmTimer 
  3.    Caption         =   "olesrv3"
  4.    ClientHeight    =   2895
  5.    ClientLeft      =   4155
  6.    ClientTop       =   960
  7.    ClientWidth     =   3000
  8.    ControlBox      =   0   'False
  9.    Height          =   3300
  10.    Left            =   4095
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   2895
  15.    ScaleWidth      =   3000
  16.    Top             =   615
  17.    Visible         =   0   'False
  18.    Width           =   3120
  19.    Begin VB.CommandButton Command1 
  20.       Caption         =   "&Clear"
  21.       Height          =   360
  22.       Left            =   1845
  23.       TabIndex        =   1
  24.       Top             =   2385
  25.       Width           =   1035
  26.    End
  27.    Begin VB.ListBox List1 
  28.       Height          =   2205
  29.       Left            =   30
  30.       TabIndex        =   0
  31.       Top             =   45
  32.       Width           =   2820
  33.    End
  34.    Begin VB.Timer Timer1 
  35.       Interval        =   8000
  36.       Left            =   1245
  37.       Top             =   735
  38.    End
  39. Attribute VB_Name = "frmTimer"
  40. Attribute VB_Creatable = False
  41. Attribute VB_Exposed = False
  42. Option Explicit
  43. Private Sub Command1_Click()
  44. List1.Clear
  45. End Sub
  46. Private Sub timer1_Timer()
  47. '-----  Run continuously until all object
  48. '       references are released.  For testing,
  49. '       leave running until manual program
  50. '       shutdown.
  51. '-----  Note: in real-life situation there would
  52. '       be an error handler in function NxtItm().
  53. Dim lngCount As Long
  54. If gcolQueue.Count > 0 Then
  55.   timer1.Enabled = False
  56.   List1.AddItem gcolQueue(1).ID & ": Processing request "
  57.   List1.Refresh
  58.   lngCount = NxtItm()
  59.   gcolQueue(1).Notify (lngCount)
  60.   gcolQueue.Remove 1
  61.   timer1.Enabled = True
  62. End If
  63. End Sub
  64.