Logo
Connect
E-mail Blog Facebook LinkedIn Twitter
User Testimonials

"I'm an avid supporter of MZ-Tools. It's a product I couldn't do without and your level of support is outstanding."

Jan Hyde (Visual Basic MVP)

"You will soon wonder how you ever lived without it."

Andy Maggs

"This is one of the most useful and best VB add-ins. Now that I have been using it I don't know how I ever worked without it. MZ-Tools has become my right hand in the VB IDE."

C. Kevin Provance


Features of MZ-Tools 8.0

The feature set of MZ-Tools 8.0 is detailed below. Each tool can be invoked through menus, from a toolbar or through a keyboard shortcut.

Features to find code faster Features to code faster
Features to design faster Features to generate documentation for your projects
Features to ensure the quality of your work Features to enhance your Visual Studio experience

Note: the availability of each feature for each Microsoft IDE is detailed in the help file.

Features to find code faster

Find / Replace Text

MZ-Tools can find strings in a method, file, project, solution or project group, selected text, group of files or group of projects. The results are shown in the following results window, much more convenient than the one provided by the Microsoft IDEs:

Result window

The results window provides multiple tabs to store all your previous searches (which you can remove too), instead of just two output panes. You can refresh the results at any time, copy them to the clipboard (to paste them in Microsoft Excel, for example), or export them to a file. You can also remove results from the list if they are not of interest, in order to see only the ones that you want to examine more carefully. You can also select if you want to see the hierarchy of code elements (class, method, etc.) where an occurrence has been found, or just the file.

From the results window after a search, you can replace the occurrences found with a new string, one by one or all at the same time. With this two-step approach, you can exclude occurrences from the list (by simply deleting them) before the replacement operation.

Method Callers

MZ-Tools can find all locations in your source code where a method is called. The results are shown in the following results window, much more convenient than the one provided by the Microsoft IDEs:

Method callers

This results window is similar to the previous one and provides similar buttons to refresh the list, to remove results, etc.

Favorite Code Elements

The Favorite Code Elements feature allows you to create a list with the code elements (methods, classes, etc.) that you use frequently so that you can go to them quickly:

Favorite code elements

Code Explorer (VB/VBA)

For VBA, VB6 and VB5, the Code Explorer feature shows a list with the code elements (methods, classes, etc.) of the active code window so that you can navigate to them quickly:

Code explorer

Go to Beginning / End of Class

MZ-Tools allows you to move the cursor in a code window to the beginning or end of the class where the cursor is positioned.

Go to Beginning / End of Method

MZ-Tools allows you to move the cursor in a code window to the beginning or end of the method where the cursor is positioned.


Features to code faster

Code Library

You can create code templates for code snippets that you use frequently, both in a Personal code library or in a Team code library shared by all team members. To insert a code template in your source code, you can select it from a treeview with all code templates, or for greater productivity you can either use an expansion keyword or a keyboard shortcut.

Code library

Code templates can include predefined variables (such as author, current date, method name, cursor position after insertion, etc.) but can include also user-defined variables, that is, your own variables. When you insert in the source code a code template with user-defined variables, a dialog asks you the values of those variables.

Line Indenter (VB/VBA)

For VBA, VB6 and VB5, the code indenter can set the correct indentation to each line of a method, file or project. There is even a line intentation review that can pinpoint which lines of code have an incorrect indentation.

New Method / Property Assistant

With this assistant you can add a new method or property to the code, and you can add a header in the same step:

New Method Property Assistant

Even if you do not usually use these types of dialogs to create methods, you will find it useful when generating multiple pairs of Get / Set properties.

Convert Field to Property

Convert Field to Property is a re-factoring feature that will allow you to convert fields like the following into properties:

[C#]
public int Count;

[VB.NET / VB / VBA]
Public Count As Integer

To do this, if you put the cursor in the line with the field declaration and you invoke this feature, the line is parsed and the corresponding values are pre-selected in the New Method / Property Assistant dialog. If you click the Insert button, the field will be converted to a Property Get / Set. You can even select several fields to convert them to properties.

Switch / Select Case Assistant for Enums

The Switch / Select Case Assistant for Enums feature allows you to quickly create a switch block or Select Case block for an enum expression. When you type a statement such as:

[C#]
switch (columnHeader.TextAlign)

[VB.NET / VB / VBA]
Select Case columnHeader.TextAlign

and you invoke this assistant, a window like the following appears:

Switch assistant for enums

With this window, you can choose the values of the enum expression which require a separate "case" statement and you can choose the order of the enum values. If you leave enum values not selected, a default (C#) or Case Else (VB.NET / VB / VBA) statement is added.

Insert Code Element Header

You can add a header (XML or standard) to the code element (file, class, method, property, event, etc.) from a customizable template which can include predefined or user-defined variables:

Code element header selections

Insert Code Element Headers

You can add headers to all the code elements of your solution or project group:

Insert code element headers

Insert Exception Handler

You can add an exception / error handler to a method from a customizable template which can include predefined or user-defined variables:

Exception handler selection

Add / Remove Line Numbers (VB.NET / VB / VBA)

You can add or remove line numbers to the source code of a method, class, file, project or solution to use the undocumented Erl function of VB.NET / VB / VBA in your error handlers (using the On Error GoTo statement). This allows you to know the exact line number that caused the error.

Sort Code Elements

You can rearrange the code elements (methods, properties, etc.) of a source code file, sorting them by name, scope, kind, etc.

Split Lines

MZ-Tools allows you to split lines of code, customizing the maximum length of a line.

Combine Lines (VB.NET / VB / VBA)

MZ-Tools allows you to combine lines of VB.NET / VB / VBA code, removing line continuation characters ("_") at the end of each line.

Sort Alphabetically Selected Lines

MZ-Tools allows you to sort alphabetically the selected lines in a text file.

Private Clipboards

MZ-Tools provides nine private clipboards. You can copy and paste snippets of code using a specific clipboard directly (with customizable keyboard shortcuts or menus) or you can use a window that MZ-Tools provides which shows the content of each clipboard:

Private Clipboards

MessageBox Assistant

The MessageBox Assistant feature provides a window to easily generate message boxes:

MessageBox Assistant

Switch Assignment

The Switch Assignment feature allows you to switch the assignment (the terms in both sides of a "=" statement) of one or more selected lines in a source code file.


Features to design faster

Smart Design Mode

If you create Windows applications, this feature will reduce dramatically the time that you spend designing your forms. When this feature is enabled, the position, size and TabIndex properties of a control are automatically set when you drop the control on a Windows 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 an existing one, the new Label control is aligned with the existing one and the same size is assigned. The TabIndex is set automatically too, so you can forget this property in most cases.

TabIndex Assistant

The TabIndex Assistant is shown below. It shows the controls of the active form window, sorted by their TabIndex property. To change the TabIndex property of a control, you can use the buttons with the up and down arrows. However, the fastest way to assign the right TabIndex property to each control is clicking the Automatic button:

TabIndex Assistant

A very useful way to check if the controls are sorted properly is to select the first control of the list and with the Down Arrow key of the keyboard select the next control, checking in the form window if the order is right.

Controls are indented showing the hierarchy in the form and optionally you can see a warning icon for the controls with a wrong TabIndex property.

Control Name Assistant

The Control Name Assistant is shown below. It allows you to quickly edit the Text and Name properties of the controls of the active form window:

Control Name Assistant

You can auto-generate the Name property from the Text property selecting the checkbox of the assistant.

Control Explorer

The Control Explorer is shown below:

Control Explorer

It allows you:

  • To explore the hierarchy of controls of the active form window.
  • To show in a property grid like the one of Visual Studio only the most used properties for each control, that you can customize.
  • To perform some actions on the selected control or controls (the Control Explorer allows multiselection) like Bring to Front, Send to Back, Cut, Copy, Copy with Code, Paste, Paste with Code, Delete and Apply Default Properties.
Copy / Paste Control(s) With Code

With this feature you can copy and paste controls along with related code (event handlers) from one form to another.

Apply Default Properties

MZ-Tools allows you to apply customized default properties to each control of a form or usercontrol, either automatically when the control is dropped, or later. Some properties you may want to apply defaults to are the Name property (to use your own prefixes), the LabelEdit or View properties of ListViews, and so on.

You can also apply a predefined modifier (private, protected, etc.) to each new control.

Prompt Name and Text Properties for New Control

You can be asked for the Name and Text / Caption (if applies) properties of each control that you add to a Windows form or usercontrol:

Prompt Name and Text properties for new control


Features to generate documentation for your projects

Generate HTML Documentation

You can generate a file with documentation of your source code in HTML format. This is accomplished by transforming the XML file generated by the Generate XML Documentation feature (see below) with an XSLT file into an HTML file. An XSLT file is supplied with MZ-Tools, that you can customize to meet your needs.

Generate XML Documentation

You can generate a file with documentation of your source code in XML format. The XML file includes elements such as references, projects, files, methods, parameters, controls, etc. Each element includes subelements with relevant properties.

The XML file also includes comment line elements for code elements whose content is extracted from the source code (provided you have entered them). Comments are extracted line by line as literals, so you can use any format for them, that is, they do not need to be XML compliant.

Statistics

You can get statistics about the number of code lines, comment lines, blank lines (totals and percentages), total lines and code elements of each source code file in the solution:

Statistics

You can sort the results, export them to a text file (tab delimited) or copy them to the clipboard to paste them in Microsoft Excel, for example.


Features to ensure the quality of your work

Review Quality

The Review Quality feature allows you to review several areas of your code and forms to find issues that you should fix to improve the quality:

Review Quality

You can review the following:

  • Line Indentation Review: for VBA, VB6 and VB5, it allows you to review the lines of code that have an incorrect indentation.
  • Access Keys Review: it allows you to review the access keys of the controls (labels, checkboxes, etc.) of forms, usercontrols, etc. An access key is an underlined character in a text (such as in "Show Using Windows Colors") that, when typing Alt + character, sets the focus to that control (in the case of checkboxes or radio buttons), to the next editable control (in the case of labels, assuming that the TabIndex property value is right) or executes the action (in the case of buttons). This feature checks that controls that should have an access key have it, and that an access key is not duplicated.
  • Code Element Headers Review: it allows you to detect the code elements that either lack a code element header or that, having one, it doesn't match any of the code element headers defined by you in the Options window.
  • Code Elements Order Review: it allows you to detect the code elements that are not sorted according to the order defined by you in the Options window.
  • Dead Code Review: it allows you to detect some unused declarations in the source code (constants, variables, parameters, methods, etc.).
  • Nomenclature Rules Review: it allows you to detect the items whose names don't follow some nomenclature rules that you can define, such as:

    - The name must use a convention of prefixes, suffixes and a specific case (Pascal, Camel, all upper case, all lower case). For example, you can define a rule to check that control names start with a custom control tag.

    - The name must meet a condition with an operator and a value or a set of values. For example, you can define a rule to check that interface names start with "I".

    - The name length must meet a condition with an operator and a numeric value. For example, you can define a rule to check that variables have more than one letter, to avoid names like i or j.
  • Programming Rules Review: it allows you to detect the items which don't follow some programming rules that you can define. You can create programming rules to check some characteristic of:

    - A single item (such as a project, file, class, etc.). In this case the programming rule checks that the value of a property meets some condition. For example, a programming rule can check that a ListView control doesn't have the LabelEdit property set to True.

    - A collection of items (for example the collection of projects of the solution, the collection of controls of a form, etc.). In this case a programming rule can check that the Count property meets some condition (for example, a programming rule can check that a solution doesn't have more than 3 projects) or it can check that the collection contains an item that meets some set of conditions (for example, a programming rule can check that Solution Folders collection contains a solution folder with the name "Documentation").
  • Spell Checker: it allows you to review the spelling of the Text property of controls, text of message boxes and text of Description attributes.
  • TabIndex Review: it allows you to review the TabIndex property of the controls of Windows Forms forms, usercontrols, etc., checking if it has the correct value for each control.

The results are shown in a window like this:

Results of Review Quality

Set Option Strict On for VB.NET Projects

VB.NET projects have an Option Strict setting (Properties window of a project, Common Properties section, Build subsection) which by default is set to Off. This feature allows you to automatically set the Option Strict On setting. If this feature is enabled, when you open a solution or when you add a VB.NET project (new or existing) to a solution, the Option Strict On setting is automatically set for the project(s).

Development Environment Settings Review

MZ-Tools allows you, as a team leader, to enforce (or at least to warn team members) common Windows registry-based settings that you define (for example indentation, tab vs spaces, versions of installed software or service packs, etc.). When MZ-Tools is loaded, it reviews those settings which are active and shows a window with the failed reviews:

Development Environment Settings Failed Reviews


Features to enhance your Visual Studio experience

Database Connection String Assistant

The Database Connection String Assistant allows you to easily create connection strings for native .NET data providers, OLE DB providers or ODBC drivers. You can test the connection, copy the connection string to the clipboard, insert it into your source code, configuration file, etc.:

Database Connection String Assistant

Save and Close Active Window

The Save and Close Active Window feature allows you save and close the active window in a single step.

Close Windows

The Close Windows feature allows you to close the open windows: all windows, all windows but the active one, only the designer windows or only the code windows.

Collapse Solution Projects

The Collapse Solution Projects feature allows you to collapse the projects in the Solution Explorer to one level.

Open Folder on Disk

The Open Folder on Disk feature allows you to open the folder where a solution, project or document is saved.

Open Build Output Folder

The Open Build Output Folder feature allows you to open the folder where a solution, project or document is saved.

Copy Selected Files to Folder

The Copy Selected Files to Folder feature allows you to copy the selected files in the Solution Explorer to a folder.

Reload Active Document from Disk

The Reload Active Document from Disk feature allows you to reload the active document from disk, which sometimes is useful. For example, to rollback to the previously saved copy of a file.

Favorite Solutions

The Favorite Solutions / Projects feature allows you to create a list with the solutions / projects that you use frequently so you can load them quickly:

Favorite Solutions

Autosave Open Documents

MZ-Tools allows you to automatically save the open documents that you have edited. You can configure how often, in minutes, the documents should be saved.

Prompt Action When Closing Solution

You can be asked what to do with a solution when closing it. For example, you may want to add it to your favorite solutions (see the Favorite Solutions feature) or you may want to delete it if it was created simply to test something:

Prompt Action When Closing Solution

Task List (VBA, VB6 and VB5)

The Task List feature allows you to keep a list of general tasks that you enter manually (with a description, priority, status, asignee, etc.) and a list automatically generated from comments that start with ' TODO: in the code of the files of the project.