ScreenUPG
addIStatusListener Method
Example 



For COM-based languages, pass in the dispatch ID. For .NET-based languages, a null parameter should be passed in. Then, manually set up the ScreenUPG.onStatusReceivedHandler delegates to receive status events.
Enables your your application to receive status event notifications from the Screen object.
Syntax
'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 
) 

Parameters

inListener
For COM-based languages, pass in the dispatch ID. For .NET-based languages, a null parameter should be passed in. Then, manually set up the ScreenUPG.onStatusReceivedHandler delegates to receive status events.
Example
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
Requirements

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

See Also

Reference

ScreenUPG Class
ScreenUPG Members
addIScreenListenerEx Method
removeIScreenListenerEx Method
removeIStatusListener Method
ScreenUPG.onStatusReceivedHandler Delegate