2.1.51 Visible


Description

The Visible property allows you to change the visible state of the Origin application window. The different states include hidden, shown, minimized, maximized, and bring to front.

Syntax

VB: Property Get/Let Visible As MAINWND_VISIBLE
C++: MAINWND_VISIBLE Visible
C#: MAINWND_VISIBLE Visible

Parameters

Remark

The Visible property can be set to one of the following values:

Constant Identifier Description
MAINWND_HIDE Hides the window and activates the next top-level window in the Z order.
MAINWND_SHOW Shows the window and displays it in its current size and position.
MAINWND_SHOW_BRING_TO_FRONT Bring the window to the front making it the top-level window in the Z order.
MAINWND_SHOWMAXIMIZED Maximizes the window.
MAINWND_SHOWMINIMIZED Minimizes the window and activates the next top-level window in the Z order.

Examples

VBA

Private Sub MyNewProject()
    Dim originApp As Origin.ApplicationSI
    Dim originWkBk As Origin.WorksheetPage
    Dim originWks As Origin.Worksheet
    Dim originMtBk As Origin.MatrixPage
    Dim originMts As Origin.MatrixSheet

    Set originApp = New Origin.ApplicationSI
    
    ' Hide Origin window while we set things up
    originApp.Visible = MAINWND_HIDE
    
    ' Start a new project
    originApp.NewProject

    ' Add a workbook with some 2 columns
    Set originWkBk = originApp.WorksheetPages.Add
    Set originWks = originWkBk.Layers(0)
    originWks.Columns.Add
    originWks.Columns.Add

    ' Add a matrix with 10 cols and 10 rows
    Set originMtBk = originApp.MatrixPages.Add
    Set originMts = originMtBk.Layers(0)
    originMts.Cols = 10
    originMts.Rows = 10

    ' Show Origin window after we set things up
    originApp.Visible = MAINWND_SHOW
End Sub

C#

private	Origin.IOApplication m_originApp;
private void connect()
{
    m_originApp = new Origin.ApplicationSI(); // SI to connect to existing Origin.
    if ( m_originApp != null )
        m_originApp.Visible = Origin.MAINWND_VISIBLE.MAINWND_SHOW;
}

Python

import OriginExt as O
app = O.Application(); app.Visible = app.MAINWND_SHOW
app.CreatePage(app.OPT_WORKSHEET)

Version Information

8.0SR2

See Also