GefApplication.Open (method)

Opens a screen file.
Syntax: Set GefScreen = object.Open ( FileName, Project, Visible )
Parameters:
FileName As String - The name of the screen to open. If this is a relative pathname, it is qualified by the DefaultFilePath.
Optional Project As String - If specified, determines the project used to qualify unqualified point IDs in the screen. The default is the project specified with the "/project" command-line option, if any.
Optional Visible As Boolean - If specified as False, the screen will be opened but will not be displayed. Use the Visible property of the GefScreen to change the visibility. The default is True.
Description: If the screen file does not exist or cannot be opened, this method returns Nothing.

Example:

Sub Application_Open()
    
    Dim oCimApp As GefApplication
    Dim oCimScr As GefScreen
    Dim strProjectDir As String
    Dim strScrName As String
    Dim strProject As String
    
    Set oCimApp = CimGetScreen.Application
    
    strProjectDir = Environ("SITE_ROOT")
    strScrName = strProjectDir & "Screens\Screen2.Cim"
    strProject = PointGet("$PROJECT")
    
    Set oCimScr = oCimApp.Open(strScrName, strProject, True)
    
End Sub
See Also: CaptivePopup , DialogPopup