Control Name Assistant

Top  Previous  Next

 VS   VB6   VBA 

The Control Name Assistant feature allows you to quickly change the Text (VS) / Caption (VB/VBA) and Name properties of the controls of a form or usercontrol.

MZ-Tools offers the following ways to show the Control Name Assistant window:

  • The MZ-Tools | Control Name Assistant menu.
  • The Control Name Assistant button on the MZ-Tools -Main toolbar.
  • In Visual Studio 2015 and higher, the keyboard shortcut associated with the MZTools.ControlNameAssistant command.
  • In Visual Studio 2013 and lower, the keyboard shortcut associated with the MZTools8.ControlNameAssistant command.
  • In VB6 / VBA, the keyboard shortcut associated with the Control Name Assistant feature.

The Control Name Assistant window is the following:

ControlNameAssistant

You can auto-generate the Name property from the Text / Caption property by checking the Generate the Name property while typing the Text / Caption property toggle button.

Remarks:

  • You can navigate the items of this window using the Previous Item / Next Item buttons on its toolbar or even if the toolwindow is not visible using the Previous Item in Last Window and Next Item in Last Window buttons on the MZ-Tools - Main toolbar, which can be associated to keyboard shortcuts. You have also the MZTools.PreviousItemLastWindow and MZTools.NextItemLastWindow commands (Visual Studio 2015 and higher) and the MZTools8.PreviousItemLastWindow and MZTools8.NextItemLastWindow commands (Visual Studio 2013 and lower).
  • You can customize the tags used for control names (for example, "btn" for buttons "lbl" for labels, etc.) in the Options window, Team Options tab, Control Tags section. You can also customize the prefix position (CancelButton vs ButtonCancel) in that section.
  • This feature does not rename instances of the Name property in the source code of the form or usercontrol, so it is recommended to use this assistant before adding code such as event handlers, etc.
  • In Visual Studio, this feature only works with Windows Forms forms, not with WPF, Web, Silverlight or Smart Device forms.
  • In VBA, this feature doesn't work with Microsoft Access forms, it only works with VBA UserForms (Insert | UserForm menu) since MZ-Tools 8.0 is an add-in for the VBA editor and not an add-in specific for Microsoft Access.

See Also:

Control Tags Options

Keyboard Shortcuts Options