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.
VB: Property Get/Let Visible As MAINWND_VISIBLE
C++: MAINWND_VISIBLE Visible
C#: MAINWND_VISIBLE Visible
The Visible property can be set to one of the following values:
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
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; }
import OriginExt as O app = O.Application(); app.Visible = app.MAINWND_SHOW app.CreatePage(app.OPT_WORKSHEET)
8.0SR2