Reflection Desktop VBA Guide
Attachmate.Reflection.Objects Library / Attachmate.Reflection.Objects.UserInterface Library / Frame Object / CreateView Method
The control to be hosted in this View
Example
In This Topic
    CreateView Method
    In This Topic
    Creates a view to host the control.
    Syntax
    expression.CreateView( _
       ByVal control As Object _
    ) As View object 
    where expression is a variable that represents a Frame Object

    Parameters

    control
    The control to be hosted in this View

    Return Value

    A new View object that hosts the specified control.
    Remarks
    Example

    This sample opens a session document.

    To run this sample, create an IBM 3270 session document named gettingStarted.rd3x and save it in your user data directory.

    Then open another IBM 3270 session document and copy this code into a code module, and run it.

    Sub OpenSessionDocument()     ' Objects required to open a new session
        Dim app As Attachmate_Reflection_Objects_Framework.ApplicationObject
        Dim terminal As Attachmate_Reflection_Objects_Emulation_IbmHosts.IbmTerminal
        Dim view As Attachmate_Reflection_Objects.View
     
        Dim sessionPath As String      
     
        'Get a handle to the existing application object (the workspace)
        Set app = GetObject("Reflection Workspace")
     
        'Create a terminal control for the new session
        sessionPath = Environ$("USERPROFILE") & "\Documents\Micro Focus\Reflection\" & "gettingStarted.rd3x"
        Set terminal = app.CreateControl(sessionPath)
     
        'Create the view used to display the session
        Set view = ThisFrame.CreateView(terminal)
    End Sub
    See Also