Partilhar via


Visual Basic Concepts

Environment Options

Visual Basic provides a great deal of flexibility, allowing you to configure the working environment to best suit your individual style. You can choose between a single or multiple document interface, and you can adjust the size and positioning of the various Integrated Development Environment (IDE) elements. Your layout will persist between sessions of Visual Basic.

SDI or MDI Interface

Two different styles are available for the Visual Basic IDE: single document interface (SDI) or multiple document interface (MDI). With the SDI option, all of the IDE windows are free to be moved anywhere on screen; as long as Visual Basic is the current application, they will remain on top of any other applications. With the MDI option, all of the IDE windows are contained within a single resizable parent window.

To switch between SDI and MDI modes

  1. Select Options from the Tools menu.

    The Options dialog box is displayed.

  2. Select the Advanced tab.

  3. Check or uncheck the SDI Development Environment check box.

    The IDE will start in the selected mode the next time you start Visual Basic.

    –or–

    Run Visual Basic from the command line with a /sdi or /mdi parameter.

Docking Windows

Many of the windows in the IDE can be docked, or connected, to each other or to the edge of the screen. These include the Toolbox, Form Layout Window, Project Explorer, Properties window, Color Palette, and Immediate, Locals, and Watch windows.

With the MDI option, windows can be docked to any side of the parent window; with SDI they can only be docked beneath the menu bar. Docking capabilities can be toggled on or off for a given window by selecting the appropriate check box on the Docking tab of the Options dialog box, available from the Options command on the Tools menu.

To dock or undock a window

  1. Select the window you wish to dock or undock.

  2. Drag the window to the desired location by holding down the left mouse button.

  3. The outline of the window will be displayed as you drag.

  4. Release the mouse button.