
MZ-Tools 3.0 is a freeware add-in for VB 5.0, 6.0 and the VBA (Office) which adds several productivity features to the IDE. You can download it from www.mztools.com, i am using this addin for 1.5 years and my productivity has really increased. i really like its feature particularly 'clear intermediate windows', 'close all windows' and 'procedure caller'. Take a look at my other VBC submission ID: 58620 & 58651
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 results are shown in a Results Window. 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 (this is customizable through the Options 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 of the Clear method. The only way to clear the Immediate Window is selecting the text (Control + A) and then pressing the Del key. The add-in offers a button and a context menu to clear that window.
The add-in 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.
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 the increment used and if global numbers should be used in the Options window.
The add-in 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.
With this feature, you can copy and paste controls with related code (events) from one form to another.
When this feature is active (it can be disabled through the Options window), each time you rename a control in a form 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.
When this feature is active (it can be disabled through the Options window), each time you add a control to a form, the add-in 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.
When this feature is active (it can be disabled through the Options window), each time you add a control to a form, you are asked for the Name and Caption (if applies) of the new control.
With this feature, you can reload a previously saved copy of a file of your project without reloading the whole project.
When this feature is active (it can be disabled through the Options window), after closing a project the add-in removes the debug files (.lib and .exp extensions), if present, that VB generates when making a DLL and that normally you will not use.
With the add-in you can close all current open windows with one click. Optionally you can keep open the active window.
When this feature is active (it can be disabled through the Options window), the add-in 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 the add-in detects it automatically according to the extension of the file.
The add-in offers customizable shortcuts to these built-in features of the IDE, avoiding the use of the mouse:
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.
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 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.
The add-in 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 results are shown in a Results Window. 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 (this is customizable through the Options window).
Leveraging the rewritten code parser of this version 3.0, 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 as the following appears:
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.
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):
This 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.
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 selecting it in the list.
This 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).
The add-in provides 9 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 the add-in provides which shows the content of each clipboard:
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.
The add-in provides a window to generate easily message boxes.
The add-in 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. include 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, the add-in 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, I provide an XSLT template that you can customize which uses also CSS, JavaScript and DHTML to expose the XML documentation as a HTML report for documentation purposes.
Although the add-in 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.
XML and XSLT can be confusing (and frustrating) to use at first, but even with no previous knowledge you can manage it in a couple of weeks. In my opinion, it is one of the most powerful and impressive technologies of the last years.
The add-in 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. The list supports multiple drag & drop for easier use.
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.
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.
This 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.
With this feature you can open the folder of a saved file. It is handy in some situations.
The add-in 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.
This feature allows you to collapse the projects of the Project Explorer with one click. It is very handy for the number of files of current applications.
This feature also fixes an annoying bug that you may have seen in the Project Explorer:
The add-in 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 results are shown in a Results Window. 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 (this is customizable through the Options window).
If you put the cursor in a line as 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 pair Property Get/Let.
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 Q149863: "PRB: Long Filenames Lost when Project is Loaded by Association". The add-in corrects this problem automatically.
In a perfect world (such as the VB.Net world, perhaps) this should not be a feature, but in the VB5 / VB6 world officially add-ins can not run at debug or run-time. Although this is also a popular belief, it is not true, but as far as I have seen, this is the first add-in with this "feature". The only caveat for you, as user, is that you must invoke the features through shortcuts instead of menus. Violating Microsoft rules running the add-in at debug or run-time modes means that internally there are some traps that can cause GPFs but hopefully I have shielded the add-in against all of them, so you can run the add-in safely in those modes. Note that most features of the add-in (such as TabIndex Assistant, Statistics, Reviews, and so on) are intended only for design-time mode, but you can run the features that have sense at debug or run-time such as Procedure Callers or Find.
The add-in has been carefully designed with usability in mind. For example, to save space the toolbar is automatically hidden in the VB6 version of the add-in at run-time or debug-time, since you can use it only at design-time.
Apart from customizing features (templates, default properties for controls, and so on), the add-in is highly customizable to feel yourself comfortable using it. Some settings that you can customize are:
Of course, all these settings are preserved among sessions.
The treeview of the window shows code lines which belong to the result of the operation performed, if it is an operation that must show code lines. You can go to the code line in the code window of Visual Basic double-clicking on it or 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, avoiding totally 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.