Solid Edge Framework Type Library
ActiveStatusBarPart Property
Solid Edge Framework Type Library > Application Object : ActiveStatusBarPart Property
Description
Sets and returns the current active status bar part.
Property type
Read-write property
Syntax
Visual Basic
Public Property ActiveStatusBarPart As Integer
Remarks
The status bar can be divided up into a number of "Parts" or sections. The ActiveStatusBarPart property defines the section of the status bar that has the focus. Anything displayed in the status bar would then be displayed in the active part.
Example
Option Infer On

Imports System
Imports System.Runtime.InteropServices

Namespace Examples
    Friend Class Program
        <STAThread>
        Shared Sub Main(ByVal args() As String)
            Dim application As SolidEdgeFramework.Application = Nothing

            Try
                ' See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic.
                OleMessageFilter.Register()

                ' Attempt to connect to a running instance of Solid Edge.
                application = DirectCast(Marshal.GetActiveObject("SolidEdge.Application"), SolidEdgeFramework.Application)

                ' Get the active status bar part.
                Dim activeStatusBarPart = application.ActiveStatusBarPart

                ' Example of changing the value.
                For i As Integer = 1 To application.StatusBarPartCount
                    application.ActiveStatusBarPart = i
                Next i
            Catch ex As System.Exception
                Console.WriteLine(ex)
            Finally
                OleMessageFilter.Unregister()
            End Try
        End Sub
    End Class
End Namespace
using System;
using System.Runtime.InteropServices;

namespace Examples
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            SolidEdgeFramework.Application application = null;

            try
            {
                // See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic.
                OleMessageFilter.Register();

                // Attempt to connect to a running instance of Solid Edge.
                application = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");

                // Get the active status bar part.
                var activeStatusBarPart = application.ActiveStatusBarPart;

                // Example of changing the value.
                for (int i = 1; i <= application.StatusBarPartCount; i++)
                {
                    application.ActiveStatusBarPart = i;
                }
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
            }
            finally
            {
                OleMessageFilter.Unregister();
            }
        }
    }
}
See Also

Application Object  | Application Members