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.
Note: the screenshots below are from the VBA editor, but most features apply to all IDEs (VBA, Visual Studio and VB6). The availability of each feature for each Microsoft IDE is detailed in the help file.
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:
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.
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:
This results window is similar to the previous one and provides similar buttons to refresh the list, to remove results, etc.
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:
For VBA and VB6, 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:
With this feature you can move the cursor in a code window to the beginning or end of the class where the cursor is positioned.
Similar to the previous one, this other feature allows you to move the cursor in a code window to the beginning or end of the method where the cursor is positioned.
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 a keyboard shortcut or an expansion keyword (that is, you type some abbreviation associated to the code template, press a custom keyboard shortcut, and the abbreviation in the code is replaced by the whole associated template).
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.
For VBA and VB6, 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.
With this assistant you can add a new method or property to the code, and you can add a header in the same step:
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 is a re-factoring feature that will allow you to convert fields like the following into properties:
[VB]
Public Count As Integer
[C#]
public int Count;
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.
The Select Case / Switch Assistant for Enums feature allows you to quickly create a Select Case block (VB) or a switch block (C#) for an enum expression. When you type a statement such as:
[VB]
Select Case columnHeader.TextAlign
[C#]
switch (columnHeader.TextAlign)
and you invoke this assistant, a window like the following appears:
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 Case Else (VB) or default (C#) statement is added.
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:
You can add headers to all the code elements of your project group, project, file, etc.:
You can add an exception / error handler to a method from a customizable template which can include predefined or user-defined variables:
You can add or remove line numbers to the source code of a method, class, file, project(s), etc. to use the undocumented Erl function of VB in your error handlers (using the On Error GoTo statement). This allows you to know the exact line number that caused the error.
You can rearrange the code elements (methods, properties, etc.) of a source code file, sorting them by name, scope, kind, etc. either automatically (one-click) according to a predefined order, or manually:
If you want to limit the maximum length of the lines of the code, you can use this feature to split lines.
This feature is the reverse of the previous one, removing line continuation characters ("_") at the end of each line.
This handy feature allows you to sort alphabetically the selected lines in a text file.
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:
The MessageBox Assistant feature provides a window to easily generate message boxes:
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.
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.
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:
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.
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:
You can auto-generate the Name property from the Text property selecting the checkbox of the assistant.
The Control Explorer is shown below:
It allows you:
With this feature you can copy and paste controls along with related code (event handlers) from one form to another.
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.
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:
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:
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.
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 of your projects:
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.
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:
You can review the following:
The results are shown in a window like this:
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).
As a team leader, you can 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:
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 of code tasks that is automatically generated from comments that start with ' TODO: and that appear in the code of the files of the project(s):
With the External Utilities feature you can create menu entries under the Tools menu or buttons on the Other Utilities toolbar of MZ-Tools with the tools that you use frequently, such as RegEdit, Windows Explorer, etc.:
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.:
The Favorite Projects / Solutions feature allows you to create a list with the projects / solutions that you use frequently so you can load them quickly:
The Save and Close Active Window feature allows you save and close the active window in a single step.
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.
The Collapse Projects feature allows you to collapse the projects in the Solution Explorer to one level.
The Open Folder on Disk feature allows you to open the folder where a project or document is saved.
The Open Build Output Folder feature allows you to open the folder where the output of compiling a project is generated.
The Copy Selected Files to Folder feature allows you to copy the selected files in the Project Explorer to a folder.
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.
When this feature is active, the open documents that you have edited are automatically saved. You can configure how often, in minutes, the documents should be saved.
You can be asked what to do with a Visual Studio 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: