Control Name Assistant

Top  Previous  Next

 VS   VB6   VB5   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, the keyboard shortcut associated with the MZTools8.ControlNameAssistant command.
     
  • In VB6 / VB5 / 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. For Visual Studio, you have also the MZTools8.PreviousItem and MZTools8.NextItem commands.
     
  • 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 Access, since it only works with VBA UserForms (menu Insert > UserForm), not with Access forms, and Access lacks VBA UserForms.

See Also:

Control Tags Options

Keyboard Shortcuts Options