GefScreens.DialogPopup (method)

Opens a captive window in the style of a dialog box.
Syntax: Set GefScreen = object.DialogPopup ( ParentScreen, FileName, Project, Visible, ObjectToEdit )
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 GefScreen.Path.
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.
Optional ObjectToEdit As GefObject - If specified, this is the object that is being "edited" by the new screen. "Edited" means that it will receive the values from the public variables on the screen object.
Description: The object that is being edited is defined as GefScreen.ObjectToEdit on the popup screen. The variables on the ObjectToEdit will be exchanged with the public variables on the screen. If the ObjectToEdit parameter is missing then no values will be brought back to the parent screen.

The GefScreen.CloseEx property must be used on the close event of the dialog window.

If the screen file does not exist or cannot be opened, this method returns Nothing.

Example:

Sub GefScreens_DialogPopup()
    
    Dim oCimScr As GefScreen
    Dim oCimScrs As GefScreens
    Dim oCimCapScr As GefScreen
    
    Set oCimScr = CimGetScreen
    Set oCimScrs = oCimScr.Parent
    
    strScrName = Environ("SITE_ROOT") & "Screens\Screen1.Cim"
    strProject = PointGet("$PROJECT")
    
    Set oCimCapScr = oCimScrs.DialogPopup(CimGetScreen, strScrName, strProject, True, CimGetObject)
    If oCimCapScr Is Nothing Then
        MsgBox "Unable to open the dialog box"
    End If
    
End Sub