Enables your your application to receive status event notifications from the Screen object.


Namespace: ScreenUPG
Assembly: ScreenUPG (in ScreenUPG.dll)

Syntax

Visual Basic (Declaration)
Public Sub addIStatusListener( _ 
   ByVal inListener As ScreenUPG _ 
)
C#
public void addIStatusListener(
   ScreenUPG inListener
)
C++
public:
 void addIStatusListener(
   ScreenUPG inListener
) sealed 
J#
public void addIStatusListener(
   ScreenUPG inListener
)
JScript
public  function addIStatusListener(
   inListener : ScreenUPG
)

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

[C#]

 Copy Code
            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
                        }
                    }
                }
            }
            
[VB]
 Copy Code
            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
            

See Also