'Declaration Public Shadows Event StateChange As StateChangeEventHandler
'Usage Dim instance As TdConnection Dim handler As StateChangeEventHandler AddHandler instance.StateChange, handler
public new event StateChangeEventHandler StateChange
public: new event StateChangeEventHandler^ StateChange
Event Data
The event handler receives an argument of type StateChangeEventArgs containing data related to this event. The following StateChangeEventArgs properties provide information specific to this event.
Property | Description |
---|---|
CurrentState | Gets the new state of the connection. The connection object will be in the new state already when the event is fired. |
OriginalState | Gets the original state of the connection. |
Remarks
The StateChange event is raised immediately during the following transitions:
- When a connection is opened the state transitions from Closed to Open.
- When a connection transitions from Open to Closed during connection closure.
Requirements
Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2
See Also