MZ-Tools 8.0 Build released introducing a line indenter, a line indentation review, other enhancements and bug fixes

Yesterday May 1, 2016, MZ-Tools was released. This build fixes a lot of (minor) bugs, but most importantly, it introduces two new features: a line indenter and a line indentation review, as explained in Moving from MZ-Tools 3.0 to 8.0 Part 31: It’s about time: A line indenter and line indentation review.

It also introduces some enhancements such as:

  • A Comment field in the code templates of the Code Library.
  • New Next Item/Previous Item buttons have been introduced in all the toolwindows that show a treeview or listview.
  • An option to delete the whole line, in the Replace panel of the Find/Replace feature.
  • When double-clicking a dead code result for a variable, parameter, etc., the whole declaration is selected (rather than only its name) to allow you to delete it pressing the Del key.
  • If you right-click the setup and click the Run as Administrator menu entry, the product is installed using machine-wide COM-registration (rather than the default current-user COM-registration), so that you can use Office with admin rights if you require it for some reason (previously MZ-Tools didn’t load and showed an error in that scenario).
  • The setup can be installed now in silent mode (with the /VERYSILENT command-line option).

The complete changelog is the following:

MZ-Tools released (May 1, 2016)

  • New feature [Internal] (VB/VBA): Line Indenter.
  • New feature [Internal] (VB/VBA): Line Indenting Review (part of the Quality Review).
  • Enhanced [Internal] (All): Added Previous Item / Next Item buttons on toolbar of Results window, TabIndex Assistant, Control Explorer, Control Name Assistant, Favorite Code Elements and Favorite Solutions/Projects.
  • Enhanced [#10729] (All): The whole line or declaration is selected when locating code elements such as fields, variables, constants and parameters, to ease its removal pressing the Del key.
  • Enhanced [#10844] (All): Added option to delete whole line in replace panel.
  • Enhanced [#10923] (All): Added Comment field to code templates of code library.
  • Enhanced [#11047] (All): The Tab character is now used when exporting contents of a treeview to a text file.
  • Enhanced [Internal] (All): The trial version now shows a warning the first day and the last days.
  • Enhanced [Internal] (All): The setup of MZ-Tools 8.0 for VBA can be installed now optionally with admin rights to allow Office apps to run with admin rights.
  • Fixed [#10883] (All): Changed order of controls in Control Explorer from theoretical tabindex to actual tabindex.
  • Fixed [#10883] (All): Changed default focus in Control Explorer from treeview to property grid.
  • Fixed [#10918] (All): The setup didn’t work with the /VERYSILENT command-line flag.
  • Fixed [#10943] (All): The Method Callers feature didn’t support Declare / DllImport methods.
  • Fixed [#10886] (All): When the IDE was maximized on a secondary screen, resizable modal windows were shown on the primary screen.
  • Fixed [#10908] (All): System.NotSupportedException “The given path’s format is not supported.” could happen in some cases creating folders.
  • Fixed [#10890] (All): The External Utilities feature didn’t allow more than one command with different parameters.
  • Fixed [#10728] (All): UnauthorizedAccessException generating HTML/XML documentation was not handled friendly.
  • Fixed [#10726] (All): The Split/Combine Lines feature ignores the selection.
  • Fixed [#10877] (All): System.ArgumentException “Illegal characters in path.” could happen in some cases.
  • Fixed [#11021] (All): The Control Name Assistant showed incorrect height for textboxes when the DPI setting was greater than 96 dpi.
  • Fixed [#11046] (All): NullReferenceException could happen in Control Explorer.
  • Fixed [#11087] (All): Statements ending with the statement separator “:” were considered labels and were not numbered.
  • Fixed [#11086] (All): The Dead Code Review reported as unused functions that were called in conditions without using parenthesis in the call.
  • Fixed [#10999] (VB.NET): Calls to constructor in same class using Me.New(…) were not excluded when adding line numbers, causing compiler error.
  • Fixed [#10958] (VB.NET): Files generated by Visual Studio were not excluded by the Line Numbering feature when using the selected items scope.
  • Fixed [#10921] (VB/VBA): End block statements that ended with statement separator (such as “End Type:”) were not processed correctly.
  • Fixed [#10919] (VB/VBA): COMException 0x800A01A8 could happen resetting menus during a session later when unloading MZ-Tools.
  • Fixed [#10924] (VB/VBA): COMException 0x80004005 (E_FAIL) could happen in Marshal.BindMoniker in Access projects.
  • Fixed [#10725] (VB/VBA): COMException 0x80029C4A (TYPE_E_CANTLOADLIBRARY) could happen with some 3rd party controls.
  • Fixed [#10925] (VB/VBA): COMException 0x800A9D06 (“Can’t edit module”) could happen in some scenarios.
  • Fixed [#10948] (VB/VBA): A pixel was shown on the screen belonging to the hidden form that captures hotkeys.
  • Fixed [#10993] (VB/VBA): Multiline comments with continuation lines were not recognized as comments.
  • Fixed [#11050] (VB/VBA): Optional parameters with initializers were not correctly identified.
  • Fixed [#11071] (VB/VBA): InvalidOperationException “Failed to compare two elements in the array” could happen with some controls.
  • Fixed [#10942] (VS): COMException 0x80041001 (BUFFER_E_READONLY) could happen when some features tried to modify code files at debug time when using Managed Compatibility Mode.
  • Fixed [#11006] (VB): COMException 0x800ADEC7 (“Duplicate definition”) could happen renaming controls.
  • Fixed [#11022] (VB): The Add Multiple Files feature didn’t set the folder of the project as initial folder.
  • Fixed [#10945] (VBA): The Method Callers feature didn’t resolve Modules, Forms and Reports properties of the Application object.
  • Fixed [#11090] (VBA): The scope selector selected “Project Group” as default.
  • Fixed [#11068] (VBA): Event handlers and parameters of the MSForms Image control were considered unused code with the Review Dead Code feature.
  • Fixed [#11052] (All): The accelerator key for VBA userforms was not retrieved correctly.
  • Fixed [Internal] (All): Optimized operations Add/Remove line numbers and Split/Combine lines.
  • Fixed [Internal] (VB/VBA): In some cases no scope was preselected in the Find Text dialog.
  • Fixed [Internal] (VB/VBA): The Spell Checker feature didn’t review InputBox statements or some cases of MsgBox statements.

Moving from MZ-Tools 3.0 to 8.0 Part 31: It’s about time: A line indenter and line indentation review

In build (May 1, 2016) two new features have been introduced: a line indenter and a line indentation review (part of the Review Quality feature).

The line indenter has been the most requested feature in the last years, and after all these months working on bug fixes since the release of MZ-Tools 8.0 for VBA/VB6/VB5 on October 2015, finally this new feature has been added:


The line indenter uses the Tab Width that you have defined in the Options window of VB/VBA (Editor tab, Code Settings section) and is customizable through a couple of options in the Options window of MZ-Tools, Team Options tab, Line Indenting section:


The line indenter works without additional dialogs if the cursor is inside a method, or otherwise it shows a dialog to select the scope (project, file, etc.). Handy menu entries in the context menu of the Project Explorer are also provided.

But the line indenter is only half of the story. Wouldn’t be nice to know which methods have some line that is not correctly indented? The new Line Indenting Review, which is part of the Review Quality feature, provides that information:


When executed, it reports the first line of each method whose indentation is not correct:


So, with these two new features you can be more productive, get your code more formatted and you can increase the quality of your source code.