GefApplication.CaptivePopup (method)

Opens a screen file in captive mode.
Syntax: Set GefScreen = object.CaptivePopup ( ParentScreen, FileName, Project, Visible )
Parameters:
ParentScreen As GefScreen - The screen that this new screen will be captive to. No input will be allowed in the parent screen until the new screen is closed.
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 App_CaptivePopup()
    
    Dim oCimApp As GefApplication
    Dim oCimScr As GefScreen
    Dim strScrName As String
    Dim strProject As String
    
    strScrName = Environ("SITE_ROOT") & "Screens\Screen1.Cim"
    strProject = PointGet("$PROJECT")
    Set oCimApp = CimGetScreen.Application
    Set oCimScr = oCimApp.CaptivePopup(CimGetScreen, strScrName, _
        strProject, True)
    
End Sub
See Also: GefScreens.CaptivePopup , GefScreen.ParentScreen , GefScreen.ChildScreens