vb6activexinternet-explorer-9common-dialogcomdlg32

Internet Explorer 9 (IE9) hangs after closing activex form e.g. common dialog (comdlg32.ocx)


my intranet app allows users to browse & print using the CommonDialog activeX control (comdlg32.ocx). This has worked fine IE6-IE8.

On IE9 client machines the common dialog is displayed as usual, however when OK or Cancel is clicked and the dialog closes, the browser hangs. It's as though the browser thinks the common dialog is still open. This is not limited to comdlg32 and affects other activeX components we use too.

However, If I call an Alert(); after calling the commondialog, the browser does not hang (a bit messy if the user has clicked cancel).

HTML dialogs work OK, e.g. document.execCommand('SaveAs','1','fileName.txt') but these don't offer the functionality that I need (e.g. to browse for a folder).

To clarify this issue, I created a simple HTML file with an object tag for the commondialog, and an html button which called the following javascript function:

function saveFile() { dialog.ShowSave(); }

Really hoping that someone can help out here as I've spent a week trying to work it out!

P.S. Using windows 7 (tried vista too) IE9, on various client machines.

Thanks

Nick


Solution

  • See above edit. This is a known MS bug in IE9. They say they'll release a proper patch within two months, but the reg hack shown above works a treat.