InfoConnect for Unisys VBA Guide
DefineEvent Function (IbmScreen)
The Long value to be used as an identifier for this event. If the value is set to 0 then a value will be automatically assigned.
The event type being defined.
Specifies an interval of time in HH:MM:SS format. The specified event must last this long to satisfy the definition. This argument is only relevant when the value you use for the EventType argument requires a duration. That is, when EventType is DefinedEventType_Silence or DefinedEventType_KeyboardEnabled. The interval begins when the DefineEvent method is executed.
Specifies the string that defines string-oriented events. This argument is only relevant when the value you use for EventType requires a string. That is, when EventType is DefinedEventType_DisplayString, DefinedEventType_TimeOfDay, or DefinedEventType_TimeElapsed.
Specifies the row location for screen events. Use a row number to specify a particular row. When EventType is DefinedEventType_DisplayString, you can use 0 to indicate that the event can occur at any row location. This argument is relevant when EventType is DefinedEventType_CursorEnterField, DefinedEventType_CursorExitField, DefinedEventType_CursorEnterPosition, DefinedEventType_CursorExitPosition, or DefinedEventType_DisplayString.
Specifies the column location for screen events. Use a column number to specify a particular column. When EventType is DefinedEventType_DisplayString, you can use 0 to indicate that the event can occur at any column location. This argument is relevant when EventType is DefinedEventType_CursorEnterField, DefinedEventType_CursorExitField, DefinedEventType_CursorEnterPosition, DefinedEventType_CursorExitPosition, or DefinedEventType_DisplayString.
Defines a specific event.
Syntax
object.DefineEvent( _
   ByVal EventNumber As Long, _
   ByVal EventType As DefinedEventType, _
   ByVal Duration As String, _
   ByVal StringParam As String, _
   ByVal Row As Long, _
   ByVal Column As Long _
) As Long

Parameters

EventNumber
The Long value to be used as an identifier for this event. If the value is set to 0 then a value will be automatically assigned.
EventType
The event type being defined.
Duration
Specifies an interval of time in HH:MM:SS format. The specified event must last this long to satisfy the definition. This argument is only relevant when the value you use for the EventType argument requires a duration. That is, when EventType is DefinedEventType_Silence or DefinedEventType_KeyboardEnabled. The interval begins when the DefineEvent method is executed.
StringParam
Specifies the string that defines string-oriented events. This argument is only relevant when the value you use for EventType requires a string. That is, when EventType is DefinedEventType_DisplayString, DefinedEventType_TimeOfDay, or DefinedEventType_TimeElapsed.
Row
Specifies the row location for screen events. Use a row number to specify a particular row. When EventType is DefinedEventType_DisplayString, you can use 0 to indicate that the event can occur at any row location. This argument is relevant when EventType is DefinedEventType_CursorEnterField, DefinedEventType_CursorExitField, DefinedEventType_CursorEnterPosition, DefinedEventType_CursorExitPosition, or DefinedEventType_DisplayString.
Column
Specifies the column location for screen events. Use a column number to specify a particular column. When EventType is DefinedEventType_DisplayString, you can use 0 to indicate that the event can occur at any column location. This argument is relevant when EventType is DefinedEventType_CursorEnterField, DefinedEventType_CursorExitField, DefinedEventType_CursorEnterPosition, DefinedEventType_CursorExitPosition, or DefinedEventType_DisplayString.

Return Value

Assigned event number
Remarks
Do not try to use VBA DefineEvent method / DefinedEvent event infrastructure and legacy Reflection COM DefineEvent/DefinedEvent infrastructure from within a single active session. This will not work properly as there are differences in functionality between the two and they each utilize the same resources in the underlying connectivity code.
See Also

 

 


2015 Attachmate

Send Feedback