MZ-Tools 8.0 Build 8.0.0.77 released introducing .NET Framework independence, other enhancements and bug fixes

Today, June 1, MZ-Tools 8.0.0.77 has been released. This build fixes some minor bugs and introduces some important enhancements:

  • For VBA/VB6/VB5 and VS 2010, you are no longer forced to install .NET Framework 2.0 on Windows 10 (or Windows 8 / Windows 8.1 if you are still using those versions). The same MZ-Tools 8.0 binaries can now work on the already installed .NET Framework 4.0 of Windows 8.x/10 and on .NET Framework 2.0 of Windows 7.
  • All .NET-based add-ins for the VBA editor of Office (or for VB6/VB5) should use a COM Shim (an intermediate native COM Dll that loads an isolated .NET environment) but unfortunately none of them do it at present. All they share the same .NET environment, which causes crashes between them. MZ-Tools 8.0 for VBA/VB6/VB5 uses now a COM Shim, so it is properly isolated from other .NET-based add-ins.
  • For VB/VBA, the code editor of templates, headers, error handlers, etc. uses now the look and feel (font, colors) that you may have customized for the VB/VBA editor.
  • For VB/VBA, you can now place MZ-Tools buttons on any toolbar (using the context menu of a toolbar and clicking the Customize… menu item) and they will work after a required restart.

The complete changelog is the following:

MZ-Tools 8.0.0.77 released (June 1, 2016)

  • Enhanced [Internal] (VB/VBA): MZ-Tools 8.0 for VB/VBA can now work on Windows 8/8.1/10 using .NET Framework 4.0 (already installed) without forcing the installation of .NET Framework 2.0.
  • Enhanced [Internal] (VS): MZ-Tools 8.0 for VS 2010 can now work on Windows 8/8.1/10 using .NET Framework 4.0 (already installed) without forcing the installation of .NET Framework 2.0.
  • Enhanced [Internal] (All): The code element header editor now adds the final carriage return if missing.
  • Enhanced [#11165] (VB/VBA): Buttons placed by hand on other toolbars (using Customize…) now work (requires restart).
  • Fixed [Internal] (VB/VBA): A COM Shim is used now for proper isolation, avoiding conflicts with other .NET-based add-ins.
  • Fixed [#11134] (All): The code template editor now colorizes the code on paste operations using Control+V or Shift+Insert keys.
  • Fixed [#11136] (All): The code template editor now fills the author field automatically.
  • Fixed [#11174] (All): Methods using the Declare modifier or the DllImport attribute were considered as valid methods for the scope selector, when they shouldn’t because they don’t have body.
  • Fixed [#11124] (VS): The Favorite Solutions feature didn’t recognize Visual Studio 2015 solutions.
  • Fixed [#11125] (VB/VBA): The code template editor now uses the font name, font size, backcolor and forecolor of the VB/VBA editor.
  • Fixed [#11007] (VB/VBA): The line indenter didn’t parse correctly methods with the Static modifier.
  • Fixed [#11101] (VB/VBA): The line indenter didn’t parse correctly Case Else statements ending with the statement separator “:”.
  • Fixed [#11159] (VB/VBA): Error “Failed to get command bar name: CommandBarKinds.EditToolBar” could happen in some cases.
  • Fixed [#11187] (VB/VBA): The error handler sample used 3 spaces as indentation (now it uses a tab character).
  • Fixed [#11189] (VB/VBA): System.UriFormatException (“Invalid URI: The hostname could not be parsed.”) was not handled friendly by the Task List when using @ssl with a SharePoint site.
  • Fixed [#11133] (VBA): The autosave documents feature now sets Application.EnableEvents = false before saving the Excel workbook.
Tweet about this on TwitterShare on FacebookEmail this to someoneShare on Google+Share on LinkedInShare on Reddit

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

Yesterday May 1, 2016, MZ-Tools 8.0.0.70 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 8.0.0.70 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.
Tweet about this on TwitterShare on FacebookEmail this to someoneShare on Google+Share on LinkedInShare on Reddit

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

In build 8.0.0.70 (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:

IndentLines

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:

LineIndentingOptions

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:

LineIndentationReview

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

LineIndentationReviewResults

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.

Tweet about this on TwitterShare on FacebookEmail this to someoneShare on Google+Share on LinkedInShare on Reddit

Moving from MZ-Tools 3.0 to 8.0 Part 30: Other minor features and enhancements

In this last post of the Moving from MZ-Tools 3.0 to 8.0 series, other minor features and enhancements will be mentioned:

The Autosave open documents feature allows you to save automatically the modified files periodically. It is configured in the Options window, Personal Options tab, Open Documents Autosaving section:

AutoSaveOpenDocuments

The Duplicate Current Line feature is present in many text editors and MZ-Tools 8.0 provides it too, although only through a keyboard shortcut:

DuplicateCurrentLine

The Default Properties feature can now be applied to a control on demand, not only when a control is added to a form:

ApplyDefaultProperties

And default properties can be applied to forms too, not only to controls:

FormDefaultProperties

The Open Build Output Folder feature adds a handy menu entry to a project in the Project Explorer to open the folder where the executable is generated:

OpenBuildOutputFolder

The Sort Alphabetically Selected Lines feature is also handy in some scenarios, to sort lines of code.

In the Moving from MZ-Tools 3.0 to 8.0 series, we have seen all the new features and enhancements that were introduced after the MZ-Tools 3.0 version for VB6/VB5/VBA (released in October 2001) during many years in the versions 4.0, 5.0, 6.0 and 7.0 for Visual Studio, until the unified version 8.0 for all IDEs was released in October 2015. MZ-Tools 8.0 provides more features, allows more customization and flexibility, removes limitations of the version 3.0, improves the user interface, etc. with the goals of making you more productive and enhancing the quality of your projects. Thanks to the feedback received during all those years, it has become the great product that it is today.

Tweet about this on TwitterShare on FacebookEmail this to someoneShare on Google+Share on LinkedInShare on Reddit

Moving from MZ-Tools 3.0 to 8.0 Part 29: Copying files between projects

Sometimes you may need to copy files between projects. For that purpose, MZ-Tools 8.0 introduces a new feature, the Copy Selected Files to Folder, which appears on the Other Utilities toolbar or menu, and on the context menu of a file in the Project Explorer:

CopyFileToFolder

Once invoked, the feature allows you to select the destination folder:

DestinationFolder

To perform the reverse operation, MZ-Tools 3.0 already offered a way to add multiple files to a project, but only using the Ctrl+D keyboard shortcut assigned to the Add File built-in feature. MZ-Tools 8.0 offers a more intuitive way through a new “Add Multiple Files…” menu entry on the Project menu or context menu, along with the other “Add…” menu entries:

AddMultipleFiles

Tweet about this on TwitterShare on FacebookEmail this to someoneShare on Google+Share on LinkedInShare on Reddit

Moving from MZ-Tools 3.0 to 8.0 Part 28: The Switch Assignment

A new feature of MZ-Tools 8.0 is the Switch Assignment, a handy feature that allows you to swap the members of an assignment between variables. For example, suppose that you have a Person user-defined type with three fields (Id, FirstName and LastName) and a form with three textboxes. When you load the form, you want to show the values in the textboxes with this subroutine:

ShowPerson

When the form is closed, you want to fill the user-defined type with the new values from the textboxes. You can copy the code from the previous subroutine:

FillPersonBeforeSwitching

And with the cursor on the first assignment you invoke the Switch Assignment feature:

FillPersonAfterSwitchingOneLine

Notice that the assignment has been swapped and the cursor has been moved to the next line, ready for a new operation. But you can select several assignments:

FillPersonBeforeSwitchingMultipleLines

And swap all of them with one click:

FillPersonAfterSwitchingMultipleLines

So, the Switch Assignment feature can save time performing those mechanical operations, allowing you to become more productive.

Tweet about this on TwitterShare on FacebookEmail this to someoneShare on Google+Share on LinkedInShare on Reddit

Moving from MZ-Tools 3.0 to 8.0 Part 27: The Spell Checker

Another new feature of MZ-Tools 8.0 that wasn’t in MZ-Tools 3.0 is a spell checker for the Caption property of controls and for the text of MsgBox statements. The Spell Checker is configured in the Options window, Team Options tab, Quality Review > Spell Checker section, where you can specify the language and what to review:

SpellCheckerOptions

It is part of the Quality Review feature:

SpellChecker

The Spell Checker requires Microsoft Word (it uses automation behind the scenes). Its output uses the same results toolwindow than the other reviews:

SpellCheckerResults

With this new feature you can improve the quality of the user interface of your projects, ensuring that the texts shown to the user don’t have spelling errors.

Tweet about this on TwitterShare on FacebookEmail this to someoneShare on Google+Share on LinkedInShare on Reddit

Moving from MZ-Tools 3.0 to 8.0 Part 26: Converting multiple fields to properties

MZ-Tools 3.0 already offered a Convert Field to Property feature that allowed you to transform a public field of a class into a property. However, if you needed to convert multiple fields, you needed to do it one by one, which required extra clicks.

MZ-Tools 8.0, when converting a single field, works like MZ-Tools 3.0. You start by putting the cursor on the line of a field:

ConvertFieldToProperty

Then you invoke the Convert Field to Property feature to get a dialog to review the values:

ConvertFieldToPropertyDialog

And after clicking the Insert button you get the new code:

ConvertedFieldToProperty

While the cursor is positioned on the next line to start a new cycle with the next field, MZ-Tools 8.0 allows you to select multiple fields:

ConvertFieldsToProperties

And then, when invoking the Convert Field to Property dialog, notice in the caption that there will be several conversions:

ConvertFieldsToPropertiesDialog

And after clicking the Insert button several times you get the whole new code:

ConvertedFieldsToProperties

So, this is another area where MZ-Tools 8.0 can make you more productive saving extra clicks if you need to perform multiple field to property conversions.

Tweet about this on TwitterShare on FacebookEmail this to someoneShare on Google+Share on LinkedInShare on Reddit

Moving from MZ-Tools 3.0 to 8.0 Part 25: Private Clipboards enhancements

Another very used feature of MZ-Tools 3.0 that has been enhanced in MZ-Tools 8.0 are the Private Clipboards. Now you have “Copy To” and “Paste From” dropdowns on the Main toolbar, to provide better accessibility if you want to use the mouse instead of keyboard shortcuts:

PrivateClipboardsDropdowns

The private clipboards are now editable so you can type anything; you don’t need to have code in a window to copy it to some private clipboard:

PrivateClipboards

And since the private clipboards are editable, you can also clear their contents with the provided buttons at the bottom of the window, either individually or all of them at the same time.

With these minor enhancements this feature provides even more productivity and flexibility than the previous version 3.0, and along with the personal Code Library it can save you a lot of time when you need to repeat code.

Tweet about this on TwitterShare on FacebookEmail this to someoneShare on Google+Share on LinkedInShare on Reddit

MZ-Tools 8.0 Build 8.0.0.51 released with bug fixes

A few hours ago the build 8.0.0.51 was released, that fixes a few minor bugs, but an important one: in some VBA IDEs (such as Word 2016 and CorelDRAW X7), MZ-Tools hanged when loaded or when the VBA editor main window was activated.

The new build also introduces a minor enhancement useful if you use multiple IDEs at the same time, or use multiple monitors with floating toolwindows. Now, the Options window and the toolwindows show in the caption the IDE description (such as “Word 2010”, “Excel 2010”, etc.):

CodeLibraryCaption

OptionsCaption

The complete changelog is the following:

MZ-Tools 8.0.0.51 released (February 9, 2016)

  • Enhanced [#10644] (All): The Check for Updates feature now verifies that the downloaded file is not corrupted.
  • Enhanced [#10696] (All): The Options window and the toolwindows now show the IDE name.
  • Fixed [#10642] (All): The Download button of the Check for Updates dialog was not disabled during the download.
  • Fixed [#10645] (VB): The Smart Design Mode caused an error when trying to modify the Height property of a Combobox.
  • Fixed [#10645] (VB): The Smart Design Mode caused an error when trying to apply negative widths.
  • Fixed [#10396] (All): The Import button didn’t import a list of items from a regular Options .xml file in some cases.
  • Fixed [#10687] (VBA): The Name of a VBA project included always the file name. Now it doesn’t include it if the project name is not the default ‘VBAProject’ name.
  • Fixed [#10675] (VBA): The hyperlinks of the “Files” section of the HTML documentation (Filename and Type table) did not work correctly in VBA.
  • Fixed [#10697] (VBA): The VBA Editor for CorelDRAW X7 hangs when opened.
  • Fixed [#10485] (VBA): The VBA Editor for Word 2106 hangs when opened.
  • Fixed [Internal] (VB/VBA): The caption of the error handler editor has been changed from ‘Exception Handler’ to ‘Error Handler’.
  • Fixed [Internal] (VB): The Prompt Name and Caption dialog used the “Text” literal instead of the “Caption” literal.
  • Fixed [Internal] (VB): The Add Multiple Files menu entry on the Project menu was not added in the correct position.
  • Fixed [Internal] (All): The icon in the list of collection item conditions of the Programming Rules Review feature was not correct.
  • Fixed [Internal] (All): The Code Library didn’t import root or intermediate folders of code templates.
  • Fixed [Internal] (All): Localization typo in French.
Tweet about this on TwitterShare on FacebookEmail this to someoneShare on Google+Share on LinkedInShare on Reddit