I have an old VB6/ActiveX web app that is not behaving well with IE9

Specifically, when the app opens a modal window, it locks up the parent window(s). It seems to work fine under IE7 and IE8

Is there are settings I can change to make this behave better. I've tried adding the site to the Comparability View settings under the Tools menu, with no better results.


I've already added the web site to my Trusted Sites and allowed all the ActiveX options (actually everything is allowed)


Fixed by MS: http://support.microsoft.com/kb/2534409


I would try this for each zone it may be used in (I will reference the Internet zone): Tools>Internet options>Security>Custom Level and scroll down to "ActiveX controls and plug-ins" area and lower the security for all of them as a test. If it fixes it, raise them one-by one until it breaks again, then turn that one setting back off.


It seems like :

Since VB6 is out of support, it is not guaranteed to be fully compatible with IE9-based WebBrowser Control.

IE9 is disabling parent windows when a vb6 modal dialog is displayed, but not re-enabling them when it closes.

Here is the workaround I have added to my code after the call to show the modal dialog:

Me.Show vbModal
Call EnableParentWindows(Me.hwnd)

Private Declare Function EnableWindow& Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long)

Public Function EnableParentWindows(ByVal hwnd As Long) As Boolean
    ' This function is intended to fix the IE9 modal dialog freeze problem
    While hwnd <> 0
        EnableWindow hwnd, &O1
        hwnd = GetParent(hwnd)
    EnableParentWindows = True
End Function

This works for me.

  • What I'm really looking for is a way to make IE9 work like IE7/8. Changing the code is not really an option right now.
    – BIBD
    Jun 14 '11 at 14:28
  • Is that a reason to downvote? Especially since this wasn't specified in the post. If the above analysis is correct, there is no other solution. As Microsoft seems to have partially broken VB6 in IE9, the only other solutions are either to avoid IE9, or to hope that this will be fixed in the future (don't hold your breath - VB6 is now unsupported).
    – harrymc
    Jun 14 '11 at 14:54
  • Update: Try the answer of Yuhong Bao (it seems like VB6 is still somewhat supported).
    – harrymc
    Jun 15 '11 at 7:04

Are you using TabProcGrowth=0 for debug? My ActiveX/IE9 was locking because of that. I had to reset that value to 1 to be able to run my AX properly (but no debug of course)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.