Updates: CommonDialog/Direct

Update20 Jun 2003

  • Hook support now enabled for Print Dialogs. The prior code did not work as the structure was incorrectly aligned. The new version fixes this problem. Many thanks to Uwe Wiemer and Klaus Probst for identifying the fix.
  • Added a properties to return the selected Printer device name, driver name and port.

Update21 Mar 2000

  • Added VB6 versions

Update1 Nov 1999

  • Added support for templates, based on the code written by Cayce Cochran.

Update20 Feb 1999

  • The File Open Dialog did not return a usable result when set up to accept multiple filenames (OFN_ALLOWMULTISELECT flag). Now the filenames are returned and there is a new method ParseMultiFileName to convert the return value into a directory and an array of file titles.
    Thanks to Steve Lager for pointing out this problem.

Update10 Dec 1998

  • Improved Hook Support. Now all Common Dialogs (except the Print dialog) can be centred to a form or to the screen with just one line of code. See the code article "Centre a Common Dialog - The Easy and the Hard Way" for more details. Hooks also allows you to capture a Common Dialog into your own form - see "Create a VB style Open Project dialog" for a demonstration.
  • Page Setup Dialog converted page sizes in inches into integer values. A new Page Setup method, VBPageSetupDlg2 has been added which correctly returns the values with decimal places.
  • The Page Setup Dialog always overwrote default and minimum margins. It now sets margins to the default unless you explicitly request it not to with the PSD_MINMARGINS / PSD_MARGINS flags.
  • Print and Page Setup dialogs used to ignore the flags parameter passed in. This meant, for example, it was impossible to display the Print Setup dialog box (the Print dialog box was always shown).
  • Print Setup failed to return number of copies and collation option when collation was turned on for some printer drivers.
  • Thanks to Larry Kuhn for spotting these problems.

Update24 May 1998

  • First Posted