Closing IE Child (IEframe) Browser Window
I am trying to program a new IE usercontrol (in vb6) referencing the Microsoft Internet Controls and Microsoft HTML Object Library.
I am using the script: PostMessage v.iehwnd, WM_CLOSE, 0&, 0& to close one of several instances of IEframes (child windows) that are open. Through debugging, I discovered the script is simultaneously disconnecting (in effect closing) the link (accessibility) between the parent IE browser and my program; resulting in run-time error: -2147417848 (80010108); [Automation Error:] The object invoked has disconnected from its clients.
Is there a way to close the child browser window(s) (which are overlays) without disrupting or terminating communication between the parent browser and the program?
I appreciate any help you can provide.