InfoConnect API Guide
Attachmate.Reflection.Emulation.IbmHosts Namespace / IIbmScreen Interface / DefineEvent Method
The integer value used as an identifier for this event. If the value is set to 0, a value is 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.


In This Topic
    DefineEvent Method (IIbmScreen)
    In This Topic
    Defines a specific event. The event remains defined until it is removed with a RemoveEvent() or ClearEvent() call or the host session is closed.
    Syntax
    'Declaration
     
    
    Function 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
    'Usage
     
    
    Dim instance As IIbmScreen
    Dim eventNumber As Integer
    Dim eventType As DefinedEventType
    Dim duration As String
    Dim stringParam As String
    Dim row As Integer
    Dim column As Integer
    Dim value As Integer
     
    value = instance.DefineEvent(eventNumber, eventType, duration, stringParam, row, column)

    Parameters

    eventNumber
    The integer value used as an identifier for this event. If the value is set to 0, a value is 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 .NET 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