expression.DefineEvent( _ ByVal EventNumber As Integer, _ ByVal EventType As DefinedEventType, _ ByVal Duration As String, _ ByVal StringParam As String, _ ByVal Row As Integer, _ ByVal Column As Integer _ ) As Integer
where expression is a variable that represents a IbmScreen Object
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