Rocket® InfoConnect Desktop (formerly a product of Micro Focus or formerly a product of Open Text) documentation, created before Rocket Software acquired certain products from OpenText, may include outdated references to "Micro Focus" or "OpenText", both of which are trademarks of OpenText or its affiliates. Rocket Software is not affiliated with Micro Focus or OpenText and has since rebranded these products as Rocket® products. You may also encounter outdated links in this documentation. If you do, please contact Rocket Support (support@rocketsoftware.com) for assistance.
Disconnected Event
In This Topic
The event occurs after the connection to the host has been disconnected.
Syntax
private Sub Terminal_Disconnected ( ByVal sender As Object, _ ByVal connectionId As Integer, _ ByVal connectionType As ConnectionTypeOption, _ ByVal connectionSettings As Object _ )
Parameters
- sender
- connectionId
- connectionType
- This is a ConnectionTypeOption Enumeration.
- connectionSettings
Example
This example logs commands and data entered and received and saves it in a text file
when logging is stopped. To run this sample, copy the code to the ThisTerminal code
window.
Private Sub Terminal_Connected(ByVal sender As Variant, ByVal ConnectionID As Long, ByVal connnectionType As Attachmate_Reflection_Objects_Emulation_OpenSystems.ConnectionTypeOption, ByVal connectionSettings As Variant) 'Start capturing text to a file: ThisScreen.ScreenPrinting.PrinterLogging = True ThisScreen.ScreenPrinting.PrintToFile = Environ$("USERPROFILE") & "\Documents" & "\test.txt" ThisTerminal.StartLogging End Sub Private Sub Terminal_Disconnected(ByVal sender As Variant, ByVal ConnectionID As Long, ByVal connnectionType As Attachmate_Reflection_Objects_Emulation_OpenSystems.ConnectionTypeOption, ByVal connectionSettings As Variant) 'Stop capturing text to a file: ThisScreen.ScreenPrinting.PrinterLogging = False ThisTerminal.StopLogging End Sub
See Also