When Origin is connected to another application via COM, you can no longer close down Origin until the controlling application terminates. The CanClose property when set to true (default is false) will make Origin hidden when user click the x button to close Origin. So this properly is essentially Hide-On-Close.
VB: Property Get/Let CanClose As Boolean
C++: bool CanClose
C#: bool CanClose
Sub CanClose() Dim app As Origin.IOApplication app = New Origin.ApplicationSI app.Visible = Origin.MAINWND_VISIBLE.MAINWND_SHOW If app.CanClose Then MsgBox("You can close the Origin instance by click the \'X\' on the title bar of the window.") Else app.CanClose = True MsgBox("By setting CanClose as true, you can close Origin now.") 'just hide it. End If End Sub
import OriginExt as O app = O.Application(); app.Visible = app.MAINWND_SHOW pageName = app.CreatePage(app.OPT_WORKSHEET) print("CanClose ? " + app.CanClose)
8.0SR2