home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "modEvents"
- '******************************************************************'
- '* *'
- '* TurboCAD for Windows *'
- '* Copyright (c) 1993 - 2001 *'
- '* International Microcomputer Software, Inc. *'
- '* (IMSI) *'
- '* All rights reserved. *'
- '* *'
- '******************************************************************'
-
- Option Explicit
-
- Dim eventHandler As New clsEvents
- Dim idEvents As Long
-
- Public Sub Main()
- On Error Resume Next
- Dim mask As Long
- frmEvents.Show
- mask = frmEvents.GetEventMask()
- If idEvents <> 0 Then
- Debug.Print "Disconnecting events " & idEvents
- Application.DisconnectEvents idEvents
- idEvents = 0
- End If
- If mask <> 0 Then
- On Error GoTo ConnectError
- idEvents = Application.ConnectEvents(eventHandler, mask)
- Debug.Print "Connected events " & idEvents
- End If
- Exit Sub
-
- ConnectError:
- MsgBox "Error connecting events: " & Err.Description
- End Sub
-
-