ScreenUPG Assembly > ScreenUPG Namespace > ScreenUPG Class : addIStatusListener Method |
'Declaration
Public Sub addIStatusListener( _ ByVal inListener As ScreenUPG _ )
'Usage
Dim instance As ScreenUPG Dim inListener As ScreenUPG instance.addIStatusListener(inListener)
public void addIStatusListener( ScreenUPG inListener )
public: void addIStatusListener( ScreenUPG^ inListener )
class Program { public ScreenUPG.ScreenUPG screen; public Program instance = new Program(); // Delegate handler public ScreenUPG.ScreenUPG.onStatusReceivedHandler myStatusReceivedHandler; public void onStatusReceived(short status, ref string details) { ....// TODO: Place your code here } static void Main(string[] args) { SessionLoader.SessionLoader sl = new SessionLoader.SessionLoader(); string xmlConfig = "your host XML configuration"; screen = sl.requestScreenEx("", "", xmlConfig, 0); if (screen != null) { // Register a listener and it's delegates screen.addIStatusListener(null); // Setup the delegates instance = new Program(); myStatusReceivedHandler = new ScreenUPG.ScreenUPG.onStatusReceivedHandler(instance.onStatusReceived); screen.onStatusReceived += myStatusReceivedHandler; // Open host connection if (screen.Open()) { ....// TODO: Place your code here } } } }
Dim WithEvents screen As ScreenUPG.ScreenUPG
Private Sub screen_onStatusReceived(ByVal status As Integer, ByRef details As String)
'TODO: Place your code here
End Sub
Private Sub addScreenListener()
screen.addIStatusListener screen
End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2