Sign in to follow this  
Followers 0
Will66

Gui cannot display 2 instances of IE embedded?

1 post in this topic

here's a demonstration of the problem. Basically the first IE's display is obscured while the second one loads, hover the mouse over the left one after clicking load 2nd ie button and it re-appears. same if you use one of the other objects like shell:

#include <GUIConstants.au3>
#include <IE.au3>
#include <Array.au3>
_IEErrorHandlerRegister ()

$oIE1 = _IECreateEmbedded ()

$gui=GUICreate("Embedded Web control Test", 680, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$GUIActiveX = GUICtrlCreateObj($oIE1, 10, 40, 300, 470)

GUISetState()       ;Show GUI

 _IENavigate ($oIE1, "http://google.com")


$button1=GUICtrlCreateButton("load IE2",10,10)
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $button1
            ie2_load()
       
    EndSelect
WEnd

GUIDelete()

Exit

Func ie2_load()
    $oIE2 = _IECreateEmbedded ()
    $GUIActiveX2 = GUICtrlCreateObj($oIE2, 350, 40, 300, 470)
    _IENavigate ($oIE2, "http://autoitscript.com")
   
EndFunc

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0