Dart Smtp, Pop, Imap Controls
State Event
Description
Fires when the State property changes.
Syntax
Visual Basic
Public Event State()
Remarks
WARNING Timeout must be 0 when calling methods from within an event. Failure to observe this rule may cause reentrancy problems and unpredictable results.
Example
Private Sub Telnet1_State()
	On Error GoTo OnError ' use intrinsic error handling
	' State of the Telnet1 connection has changed...put up user feedback
	Select Case Telnet1.State
	Case tcpConnecting
		Label1.Caption = "Client Connecting..."
	Case tcpConnected
		Label2.Caption = "Client Connected to " & Tcp1.RemoteAddress
	Case tcpClosing
		Label3.Caption = "Client Closing..."
	Case tcpClosed
		Label4.Caption = "Client Closed"
	End Select
Exit Sub
OnError: ' Any error jumps here
	Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description
End Sub
See Also

Imap Object  | Imap Members


PowerTCP Mail for ActiveX Documentation Version 2.13
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic