I am writing an activex control in VB6. I have non-modal windows which when they are not in focus will flash in the taskbar so that the user can see a change has occurred.

The problem I am having is with the main window. If the user is browsing in another window and can't see the window with the control, I want that window to flash too, but I can't get the hWnd of the IE window to pass to the FlashWindow procedure.

I have tried various properties, such as Usercontrol.ContainerhWnd, Me.hWnd, UserControl.Parent.hWnd etc and none seem to work. I expect there is a simple solution, but I can't seem to find it.

Any ideas?