com.esri.arcgis.framework
Interface IModelessFrame

All Superinterfaces:
Serializable
All Known Implementing Classes:
ModelessFrame

public interface IModelessFrame
extends Serializable

Provides access to a means of displaying modeless dialogs implemented with VisualBasic.

Remarks

When hosting VB forms within any application not written in Visual Basic itself, the Tab index of forms may not be honored correctly. To address this problem, the controls within a form should be created in their Tab index order. Use the 'ESRI Align Controls with Tab Index' VBAddin.

Tabbing will not work for controls that are nested within a container, for example controls that are nested within a frame of a tab strip control. Move these controls out of the containers and place them back onto the VB form to resolve.

When To Use

The ModelessFrame object provides Visual Basic developers with a way to implement modeless windows in ArcGIS without requiring VBA to initialize. It is essentially a wrapper around ordinary VB forms. The ModelessFrame object requires minimal changes to existing VB code to take advantage of it. It will also manage the Z order of modeless forms so that they behave correctly with respect to application focus and ensures that the window minimizes and restores appropriately with the ArcGIS application.

You should only need to use IModelessFrame when you are developing with Visual Basic. Modeless forms implemented in other development environments—including C++, C#, and VB.NET—will work as expected in ArcGIS without needing to implement this interface.

Product Availability

Available with ArcGIS Desktop.


Method Summary
 void create(Object vbForm)
          Creates the modeless frame around the specified VisualBasic form object.
 String getCaption()
          The caption of the modeless frame.
 boolean isVisible()
          Indicates if the modeless frame is visible.
 void setCaption(String pCaption)
          The caption of the modeless frame.
 void setVisible(boolean bVisible)
          Indicates if the modeless frame is visible.
 

Method Detail

create

void create(Object vbForm)
            throws IOException,
                   AutomationException
Creates the modeless frame around the specified VisualBasic form object.

Description

The ModelessFrame object controls the life cycle of the Visual Basic form. You should pass an instance of the VBForm and not the Form itself. For example, you should use the following style when you create the ModelessFrame object;

  Dim pForm As Form1

  Set pForm = New Form1

  Dim pFrame As IModelessFrame

  Set pFrame = New ModelessFrame

  pFrame.Create pForm

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
vbForm - A reference to another Automation Object (IDispatch) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setVisible

void setVisible(boolean bVisible)
                throws IOException,
                       AutomationException
Indicates if the modeless frame is visible.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
bVisible - The bVisible (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isVisible

boolean isVisible()
                  throws IOException,
                         AutomationException
Indicates if the modeless frame is visible.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
The bVisible
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCaption

void setCaption(String pCaption)
                throws IOException,
                       AutomationException
The caption of the modeless frame.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
pCaption - The pCaption (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCaption

String getCaption()
                  throws IOException,
                         AutomationException
The caption of the modeless frame.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
The pCaption
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.