Programming with Reflection
Wait
and Event Keywords
Reflection's event-handling methods and properties allow you to associate actions with events that can happen during a Reflection session. Reflection's API includes several ways of managing events.
This topic describes and lists events in the following four categories:
· Automation events
· OnEvent methods
· DefineEvent methods and properties
· Wait commands
Automation Events
Automation events are a standard part of OLE Automation APIs. Events of this type are part of an application's object library and are identified in the Visual Basic Editor Object Browser with a lighting bolt icon.
Commands in this group are equivalent to using Reflection's Event Setup dialog box. For example, you can add items to Reflection's Event Setup dialog box using the OnEvent method, and delete items using the RemoveOnEvent method. Changes you make to Reflection using these commands can be saved to your settings file.
Commands in this group are defined using the DefineEvent method. This method defines an event without associating a specific action with that event. You can use subsequent commands to check for the occurrence of a defined event, or to wait for a defined event to happen. Commands in this group have no effect on the Event Setup dialog box; and events you define using the following methods are not saved as part of your settings file; with each new Reflection session, you must run the macro in order to define the event. (The value of the KeysDuringWait property is saved with your settings.)
Commands in this group wait for an event that is defined as part of the command. These commands have no effect on the Event Setup dialog box; and events you define with these methods are not saved as part of your settings file. (The value of the KeysDuringWait property is saved with your settings.)
WaitForPrinterStatusString
method