Jump to content

getting IE object to show above other items?


Recommended Posts

Hi,

I am using the below code to display a html page within a GUI, however it goes under other control elements, is there a way I can tell it to go to top so it can display in a tab?

Opt("ExpandVarStrings", 1)
$oIE = ObjCreate("Shell.Explorer.2")
$GUIActiveX = GUICtrlCreateObj($oIE, 40, 100, 560,270)
$oIE.navigate("@ScriptDir@\test.html")
$oIE = 0

example:

#include <GUIConstants.au3>

GUICreate("ControlSetText",600, 400)

$tab=GUICtrlCreateTab (10,10, 580,345)

$tab0=GUICtrlCreateTabitem ( "Tab 0")
    GUICtrlCreateLabel ("Tab 0 Code and stuff here", 30,60,300,20)
    $SDMrestarts = GUICtrlCreateInput ("",230,247, 50, 20)
    $SDMupdown = GUICtrlCreateUpdown($SDMrestarts)
GUICtrlCreateGroup ("",-99,-99,1,1) ;close group

GUICtrlCreateTabitem ("")  ; end tabitem definition

$tab1=GUICtrlCreateTabitem ("Tab 1")
    GUICtrlCreateLabel ("Tab 1 Code and stuff here", 30,80,300,20)
GUICtrlCreateTabitem ("")  ; end tabitem definition

$tab2=GUICtrlCreateTabitem ("Tab 2")
    GUICtrlCreateLabel ("Tab 2 Code and stuff here", 30,100,300,20)
GUICtrlCreateTabitem ("")  ; end tabitem definition

$tab3=GUICtrlCreateTabitem ("Lobby")
    Opt("ExpandVarStrings", 1)
    $oIE = ObjCreate("Shell.Explorer.2")
    $GUIActiveX = GUICtrlCreateObj($oIE, 40, 100, 560,270)
    $oIE.navigate("@ScriptDir@\test.html")
    $oIE = 0
GUICtrlCreateTabitem ("")  ; end tabitem definition

$tab4=GUICtrlCreateTabitem ("Tab 4")
    GUICtrlCreateLabel ("Tab 4 Code and stuff here", 30,100,300,20)
GUICtrlCreateTabitem ("")  ; end tabitem definition

GUICtrlSetState($tab3, $GUI_SHOW)
GUISetState()

While 1
  Sleep(1000)
Wend

My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

I am using the below code to display a html page within a GUI, however it goes under other control elements, is there a way I can tell it to go to top so it can display in a tab?

Opt("ExpandVarStrings", 1)
$oIE = ObjCreate("Shell.Explorer.2")
$GUIActiveX = GUICtrlCreateObj($oIE, 40, 100, 560,270)
$oIE.navigate("@ScriptDir@\test.html")
$oIE = 0

example:

..

Hello,

This is similar to the problem mentioned here:

http://www.autoitscript.com/forum/index.php?showtopic=19641

You can wait until the next AutoIt beta version or add this line right after GUICtrlCreateObj:

GUICtrlSetStyle($oIE, $WS_VISIBLE)

(Sorry about the very late answer)

Regards,

-Sven

Link to comment
Share on other sites

I added 'GUICtrlSetStyle($oIE, $WS_VISIBLE)' under the '$GUIActiveX = GUICtrlCreateObj($oIE, 40, 100, 560,270)' but the it still won't show in a tab

#include <GUIConstants.au3>

GUICreate("ControlSetText",600, 400)

$tab=GUICtrlCreateTab (10,10, 580,345)

$tab0=GUICtrlCreateTabitem ( "Tab 0")
    GUICtrlCreateLabel ("Tab 0 Code and stuff here", 30,60,300,20)
    $SDMrestarts = GUICtrlCreateInput ("",230,247, 50, 20)
    $SDMupdown = GUICtrlCreateUpdown($SDMrestarts)
GUICtrlCreateGroup ("",-99,-99,1,1);close group

GUICtrlCreateTabitem ("") ; end tabitem definition

$tab1=GUICtrlCreateTabitem ("Tab 1")
    GUICtrlCreateLabel ("Tab 1 Code and stuff here", 30,80,300,20)
GUICtrlCreateTabitem ("") ; end tabitem definition

$tab2=GUICtrlCreateTabitem ("Tab 2")
    GUICtrlCreateLabel ("Tab 2 Code and stuff here", 30,100,300,20)
GUICtrlCreateTabitem ("") ; end tabitem definition

$tab3=GUICtrlCreateTabitem ("Lobby")
    Opt("ExpandVarStrings", 1)
    $oIE = ObjCreate("Shell.Explorer.2")
    $GUIActiveX = GUICtrlCreateObj($oIE, 40, 100, 560,270)
    GUICtrlSetStyle($oIE, $WS_VISIBLE)
    $oIE.navigate("@ScriptDir@\test.html")
    $oIE = 0
GUICtrlCreateTabitem ("") ; end tabitem definition

$tab4=GUICtrlCreateTabitem ("Tab 4")
    GUICtrlCreateLabel ("Tab 4 Code and stuff here", 30,100,300,20)
GUICtrlCreateTabitem ("") ; end tabitem definition

GUICtrlSetState($tab3, $GUI_SHOW)
GUISetState()

While 1
  Sleep(1000)
Wend

My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator

Link to comment
Share on other sites

I added 'GUICtrlSetStyle($oIE, $WS_VISIBLE)' under the '$GUIActiveX = GUICtrlCreateObj($oIE, 40, 100, 560,270)' but the it still won't show in a tab

..
Woops SORRY! typo !

It had to be: GUICtrlSetStyle($GUIActiveX, $WS_VISIBLE)

-Sven

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...