WaitForIncomingData2 Method
Waits for any data to come from the host during which time the keyboard is disabled.
expression.WaitForIncomingData2( _
ByVal As Integer _
) As ReturnCode
where
expression is a variable that represents a
Screen Object
Parameters
- timeout
- wait timeout value (milliseconds). Value of 0 indicates wait indefinitely.
Return Value
One of the following ReturnCode enumeration values.
Member |
Description |
Cancelled |
Cancelled. |
Error |
Error. |
PermissionRequired |
Permission is required. |
Success |
Success. |
Timeout |
Timeout condition. |
Truncated |
The text is truncated. |
This example waits for the response from the host after a controlkey is sent in the VT terminal.
Private Sub Screen_ControlKeySent(ByVal sender As Variant, ByVal Key As Attachmate_Reflection_Objects_Emulation_OpenSystems.ControlKeyCode)
Dim text As String
'Print the control key that sent the command
Debug.Print "key " & Key
'When text is received by the VT terminal from the host, print the screen
If ThisScreen.WaitForIncomingData2(1000) = ReturnCode_Success Then
text = ThisScreen.GetText2(1, 1, ThisScreen.DisplayRows, ThisScreen.DisplayColumns)
Debug.Print text
End If
End Sub