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 3.0 for Visual Basic 6.0, 5.0 and VBA

The feature set of MZ-Tools 3.0 is the following (notice that not all the features of MZ-Tools for Visual Basic 6.0 / 5.0 are present in the version for VBA, as it is explained in the help file):

Find code faster Features to find code faster Code Faster Features to code faster
Design Faster Features to design faster Documention Features to generate documentation for your projects
Quality Features to ensure the quality of your work Enhance Features to enhance your VB / VBA experience

Features to find code faster

Find / Replace In All Projects

MZ-Tools can find strings in a procedure, module, project, project group or selected text. The results are shown in a Results Window which allows you to locate the line within the code window.

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 replacing operation.

Procedure Callers

MZ-Tools can find the procedures which call a given procedure, showing the results in a docking window like the following:

Procedure Callers Image

You can go to the code line in the code window of Visual Basic by double-clicking on it or by pressing the Enter key if the line is selected in the treeview. You can also remove code lines from the results window pressing the Del key (this feature is useful if you are using the results as a "To Do" list). You can define a customizable shortcut to return to the last results window used, thereby totally avoiding the use of the mouse while switching between a code window and a results window. Finally, you can also export the results to a text file (tab delimited) or copy them to the clipboard.

Favorite Procedures

With this feature you can create a persistent list with the procedures of a project that you use frequently and you can go to one of them by selecting it in the list.

The Favorite Procedires feature is intended to replace the bookmarks feature of Visual Basic, which has a couple of flaws: bookmarks are not persistent among sessions and bookmarks are not named (you can only go to the next or to the previous one).

Top

Features to code faster

Code Templates

You can create code templates in the Options window for code snippets that you insert frequently in your source code. To insert a code template in your source code, you can select it from a list with all code templates, or you can define a shortcut for each one for greater productivity.

Code templates can include predefined variables (such as author, current date, procedure name, cursor position after insertion, etc.) but also can include 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 to supply the values of those variables. For example, you can define a code template to create a collection class with a user-defined variable which is the name of the class of the objects that the collection will hold, used in the Item() and Add() methods.

Add Procedure

With a dialog window you can add properties, functions or subroutines to the code. In contrast to the dialog window that Visual Basic uses, in the dialog window of MZ-Tools you can select the data type (String, Long, Control, Collection ...). In addition, you can add a procedure header and/or error handler in the same step. Even if you do not usually use these types of dialogs to create procedures, you will find it useful when generating multiple pairs of Get / Let or Set properties:

Add Procedure Image

In the Options window you can set nomenclature prefixes for the name of variables that MZ-Tools will generate.

Add Procedure Header

You can add a header to a procedure (above or below the declaration) with a customizable template which can include predefined variables.

Add Error Handler

You can add an error handler to a procedure with a customizable template. If the procedure body is not empty, MZ-Tools merges the error handler with the procedure code.

Add Both

To save time, you can add the header and error handler to a procedure in one step.

Add Module Header

You can add a header to a module with a customizable template which can include predefined variables.

Select Case Assistant For Enum Expressions

When you write in a code window a Select Case <Enum expression> statement such as

Select Case m_ctlListView.ColumnHeaders(1).Alignment

and you invoke this assistant (with a shortcut for greater productivity) a window like the following appears:

Select Case Assistant Image

With this window, you can choose the values of the enum expression which require a separate Case statement. If you leave enum values not selected, a Case Else statement is added.

Line Numbering

You can add or remove line numbers to a procedure, module, project or project group through the corresponding context menu in the Project Explorer. This feature is useful if you use the (undocumented) Erl function in your error handlers to know the line that caused the error. You can define in the Options window the increment used and if global numbers should be used.

Private Clipboards

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

Private Clipboards Image

MsgBox Assistant

MZ-Tools provides a window to easily generate message boxes:

MsgBox Assistant

Sort Procedures

MZ-Tools can show a window with all the procedures of the current file. In this window, you can rearrange the order of the procedures by scope, name, type or manually.

Split / Combine Lines

You can split (insert line continuation characters) or combine lines in source code at project-group, project, file, procedure or selection level. The maximum length of a line is customizable in the Options window.

Convert Selection To Upper / Lower Case

You can convert the selected text to upper or lower case. This is useful when converting constants (typically in upper case) to enum values (typically in lower case) or vice versa.

Convert Public Variable To Property

If you put the cursor in a line like the following:

Public Count As Long

then, when you invoke this feature the line is parsed and the corresponding values are pre-selected in the Add Procedure dialog. If you click the Add button, the member variable will be converted to a Property Get/Let pair.

Top

Features to design faster

TabIndex Assistant

TabIndex Assistant Image

The TabIndex Assistant is shown to the left. It shows the controls of the selected file in the Project Explorer of Visual Basic, sorted by their TabIndex property. To change the TabIndex property of a control, you can use the buttons with the up and down arrows or drag and drop a control in the list to a new position (multiple drag and drop is supported). However, the fastest way to assign the right TabIndex property to each control is by clicking the Automatic button.

When you select a control from the list, if the file which it belongs to has the designer window open, the control is selected in the designer. 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 designer 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.


Copy And Paste Controls With Code

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

Rename Controls With Code

When this feature is active, each time you rename a control which is not part of an array, the related code (events and occurrences in the code of that form) is also renamed accordingly, saving time to you.

Controls Default Properties

When this feature is active, each time you add a control to a form, MZ-Tools applies the default properties that you have customized in the Options window. Some useful properties you will want to change are the name of the controls (to use your own prefixes), the Caption or Text properties (to use empty values), the height of Labels or TextBoxes, the LabelEdit or View properties of listviews, and so on.

Prompt for Name and Caption Properties When Adding a Control

When this feature is active, each time you add a control to a form, you are asked for the Name and Caption (if applies) of the new control.

Top

Features to generate documentation for your projects

XML Documentation

MZ-Tools can generate an XML file with documentation at project group, project or file level (through context menus). The XML file includes elements such as References, Projects, Files, Procedures, Parameters, Controls, etc. Each element such as a Reference, Procedure, Parameter, etc. includes sub-elements with relevant properties. For example, for the Parameter element you have the type, optional, default value, etc.

The XML file also includes comment line elements for module and procedure 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.

Although not required, MZ-Tools allows you to include a reference to an XSLT template in the XML file when is generated, which allows you to format the XML file for viewing it with Microsoft Internet Explorer 5.0 or higher.

There are a lot of uses for the XML file. As example, an XSLT template is provided that you can customize which uses also CSS, JavaScript and DHTML to expose the XML documentation as an HTML report for documentation purposes.

Although MZ-Tools does not require the Microsoft XML Parser to generate the XML file, you will need it (specifically Microsoft XML Parser 3.0 SP1 or higher in Replace Mode) to use XSLT templates.

Statistics

MZ-Tools can show statistics (number of code lines, comment lines, total lines, procedures and controls, along with totals) of your source code at project-group, project or file level (through context menus). Blank lines are excluded from the 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.

Statistics Image

Top

Features to ensure the quality of your work

Review Source Code

MZ-Tools can review your source code at project-group, project or file level (through context menus) detecting unused variables, constants, parameters, private procedures, and so on. For performance reasons, only private declarations are reviewed.

The source code review can be launched automatically (or you can be asked) when you make the executable of a project, that is, clicking some of the File | Make ... menus.

Review TabIndex Property

MZ-Tools can review the TabIndex property of the files which use controls at project-group, project or file level (through context menus). This review uses the same algorithm as the TabIndex Assistant to check if the controls have the right TabIndex property.

The review of the TabIndex property can be launched automatically (or you can be asked) when you make the executable of a project, that is, clicking some of the File | Make ... menus.

Review Collections

MZ-Tools can review the files that are collections at project-group, project or file level (through context menus). When a class file (.cls extension) is reviewed, if it contains the Item or NewEnum methods it is considered a collection. In this case, the following requirements are reviewed:

  • If it has the Item method, it must have the NewEnum method (implemented as Function or Property Get).
  • If it has the NewEnum method, it must have the Item method (implemented as Function or Property Get).
  • The NewEnum method must have Procedure ID -4.
  • The Item method must have Procedure ID 0 (Default).

The collections review can be launched automatically (or you can be asked) when you make the executable of a project, that is, clicking some of the File | Make ... menus.

Review Access Keys

MZ-Tools can review access keys (the underlined character of dialog controls) at project-group, project or file level (through context menus) detecting controls without access key or collisions among access keys.

The access keys review can be launched automatically (or you can be asked) when you make the executable of a project, that is, clicking some of the File | Make ... menus.

Top

Features to enhance your VB / VBA experience

Clear Immediate Window

Visual Basic does not offer a handy way to clear the contents of the Immediate Window. There is no context menu and the Debug object lacks a Clear method. The only way to clear the Immediate Window is selecting the text (Control + A) and then pressing the Del key. MZ-Tools offers a button and a context menu to clear that window.

Task List

MZ-Tools offers a task list for each project (in fact, the tasks are saved in the .vbp file). For each task you can enter the description, priority, assigned person, status and comments. You can filter the list by status, priority or assigned person, sort the tasks by any field, export them to a text file (tab delimited) or copy them to the clipboard to paste them in Microsoft Excel, for example.

Task List Image

Reload File From Disk

With this feature you can reload a previously saved copy of a file of your project without reloading the whole project.

Remove Debug Files (.lib and .exp) When Closing Project

When this feature is active (it can be disabled through the Options window), after closing a project MZ-Tools removes the debug files (.lib and .exp extensions), if present, that VB generates when making a DLL and that normally you will not use.

Close Windows

With MZ-Tools you can close all current open windows with one click. Optionally you can keep open the active window.

Add Multiple Files To Project

When this feature is active (it can be disabled through the Options window), MZ-Tools intercepts the Add File... buttons and the Ctrl+D shortcut to show an Add File dialog that allows multiselection. In addition, you do not have to specify if the file is a "related document" since MZ-Tools detects it automatically according to the extension of the file.

Shortcuts To Built-in IDE Features

MZ-Tools offers customizable shortcuts to these built-in features of the IDE, avoiding the use of the mouse:

  • Comment / Uncomment Block
  • Bookmarks buttons
  • Remove File from Project
  • Toggle visibility of the Watch Window and Locals Window
Shortcut To Save File At Debug-Time or Run-Time

You can define a shortcut to save the selected file at debug-time or run-time. Although Visual Basic does not allow to save files at debug-time or run-time, often it is useful to save the modifications that you have made to the source code at those times.

Favorite Projects

With this feature you can create a list with the projects that you use frequently and you can load them (closing the current Visual Basic instance or not):

Favorite Projects Image

The Favorite Projects feature is intended to replace the Recent Projects feature of Visual Basic, which has a couple of flaws: a recent project is not always a favorite project and you can not delete a recent project without digging into the registry.

External Utilities

You can include (through the Options window) your own external utilities, that will be added at the bottom of the Other Utilities menu of the toolbar. For example, you can include as external utilities your favorite icon editor, database tool, etc. and even scripts, documents or URLs. In addition, you can pass to each external utility the file name of the current module, project or project group.

External Utilities Image

Edit File As Text

The Edit File As Text feature allows you to edit a file of your project (such as a form) with the editor that you have associated with .txt files (typically Notepad, but it can be a better one). You can modify it, save it and reload it with the Reload File From Disk feature.

Open Folder Of File

With this feature you can open the folder of a saved file. It is handy in some situations.

ADO Connection String

MZ-Tools can show the Data Links dialog of OLE DB to create a connection string. When you accept the dialog, the connection string is copied to the clipboard, and you can paste it into your source code, configuration file, etc.

Collapse Projects

The Collapse Projects feature allows you to collapse the projects of the Project Explorer with one click.

This feature also fixes an annoying bug that you may have seen in the Project Explorer:

  • Open Visual Basic. Project1 and Form1 are created by default.
  • Add a second form, Form2.
  • In the Project Explorer, click in the Form1. The Form1 item is selected.
  • Right-click in the Form2 item. The context menu appears.
  • While the context menu is shown, click with the left button of the mouse in the Form1 item. The context menu is closed and the Form1 item has the rectangle border of the selected item (which is right) but the Form2 item remains with the blue background forever. Clicking the Collapse Projects button of MZ-Tools fixes this problem.
Fix VB registry entries to prevent character ~ when opening VB files by double-clicking them

By default, after installing Visual Basic when you double-click a .vbp, .vbg or other VB extension file, the file is loaded as short file name instead long file name. See MSDN Knowledge Base Article PRB: Long Filenames Lost when Project is Loaded by Association. MZ-Tools corrects this problem automatically.

Add-in Features Working At Debug or Run-Time

Although officially VB5 / VB6 add-ins can not run at debug or run-time, MZ-Tools does. The only caveat is that you must invoke the features through keyboard shortcuts instead of using menus or buttons. Note that most features of MZ-Tools (such as the TabIndex Assistant, Statistics, Reviews, and so on) are intended only for design-time mode, but you can run the features that are relevant at debug or run-time, such as the Procedure Callers or Find features.

Top