InfoConnect API Guide
Attachmate.Reflection.UserControl.OpenSystems Namespace / OpenSystemsTerminalControl Class / InitInstance Method / InitInstance(String) Method
The session path.
Example


In This Topic
    InitInstance(String) Method
    In This Topic
    Initializes this terminal instance with an existing session file.
    Syntax
    'Declaration
     
    
    Public Overloads Sub InitInstance( _
       ByVal sessionFilePath As String _
    ) 
    'Usage
     
    
    Dim instance As OpenSystemsTerminalControl
    Dim sessionFilePath As String
     
    instance.InitInstance(sessionFilePath)
    public void InitInstance( 
       string sessionFilePath
    )

    Parameters

    sessionFilePath
    The session path.
    Remarks

    The InitInstance call is required to initialize the terminal user control with sufficient information to render a terminal user interface.

    Use the TerminalInitializedEventHandler to check if errors occurred during terminal initialization.

    Example
    Open a session document and check for errors
    private void Form1_Load(object sender, EventArgs e)
    {
     
        openSystemsTerminalControl1.InitInstance(Environment.GetEnvironmentVariable("USERPROFILE") + @"\Documents\Micro Focus\InfoConnect\demo.rdox");
     
    }
     
    private void openSystemsTerminalControl1_TerminalInitializedEvent(object sender, AsyncCompletedEventArgs e)
    {
        // Check if error occurred during the terminal initialization
        if (e.Error != null)
        {
            MessageBox.Show("Error during terminal initialization step: " + e.Error); return;
        }
     
    }
    See Also