Smart Design Mode

Top  Previous  Next

 VS   VB6 

When the Smart Design Mode feature is enabled, the position, size and TabIndex properties of a control are automatically set when you drop the control on a form or usercontrol. To do this, MZ-Tools examines the position and size of the controls that will surround the new control and estimates a suitable position and size for it. For example, if you add a Label control below and existing one, the new Label control is aligned with the existing one and the same size is assigned. The TabIndex is set for all controls using the same algorithm that the TabIndex Assistant feature uses when clicking the Automatic button. This feature also monitors the change of size, position, parent, etc. of existing controls and reassigns the TabIndex values of the involved controls if needed.

MZ-Tools offers the following ways to enable or disable the Smart Design Mode feature:

  • The MZ-Tools | Smart Design Mode toggle menu.
  • The Smart Design Mode toggle button on the MZ-Tools - Main toolbar.
  • In Visual Studio 2015 and higher, the keyboard shortcut associated with the MZTools.SmartDesignMode command.
  • In Visual Studio 2013 and lower, the keyboard shortcut associated with the MZTools8.SmartDesignMode command.
  • In VB6, the keyboard shortcut associated with the Smart Design Mode feature.

Notice that there are three ways to add a control to a form from the toolbox:

  • You can select a control in the IDE Toolbox and drag a rectangle over the surface of the form or container control before dropping it. In this case this feature takes the size of the dragged rectangle as a hint from you about the desired size of the control.
  • You can select a control in the IDE Toolbox and drop it on the form or container control without dragging a rectangle. In this case this feature estimates the best size. With this technique you can design your forms faster because you don't spend time dragging rectangles.
  • You can simply double click on the control of the IDE Toolbox. In this case, this feature adds the control below the currently selected control in the form. This is the fastest way to design your forms, but it is only useful when you want to add several identical controls to a form, each one below the previous one, such as the labels and textboxes of a typical data entry form.

You can customize in the Options window, Team Options tab, Smart Design Mode section, several values for the separation between controls used by this feature.

Remarks:

  • In Visual Studio, this feature only works with Windows Forms forms, not with WPF, Web, Silverlight, or Smart Device forms.
  • This feature may not work correctly with 3rd party controls.

See Also:

Smart Design Mode Options

Keyboard Shortcuts Options