Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Help Needed With Embedding ActiveX Object


  • Please log in to reply
No replies to this topic

#1 KBcool

KBcool

    Seeker

  • Normal Members
  • 4 posts

Posted 01 September 2012 - 03:43 AM

OK, so here's the deal. I've been working on a utility that has an embedded explorer window in it. This window gets pointed to a shared folder and you should be able to launch applications by double clicking. Sounds simple enough right? The kicker is, the GUI locks up if I launch an app from the embedded browser (CPU shoots to max).

Now I've done a ton of troubleshooting and narrowed it down to exactly what is interfering.

If I have any other basic control in place (there are quite a few) it causes the issue. Remove them so that all that exists is the embedded browser and it works just fine.

Here is a condensed version to show the issue:

This doesn't work:
AutoIt         
#RequireAdmin #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <TabConstants.au3> #include <EditConstants.au3> #include <GUIEdit.au3> Opt("GUIOnEventMode", 1) $Form1 = GUICreate("Form1", 541, 450, -1, -1, BitOR($GUI_SS_DEFAULT_GUI,$WS_CLIPCHILDREN)) GUICtrlCreateLabel("Name:", 344, 232, 35, 17,"", $WS_EX_TRANSPARENT) GUISetState(@SW_SHOW) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $Form2 = GUICreate("Form2", 297, 337, 16, 70, $WS_CHILD, "", $Form1) $TabGrp2 =GUICtrlCreateTab( 1,1,295,335) $Tab2 = GUICtrlCreateTabItem("test") $Tab3 = GUICtrlCreateTabItem("test2") $oIE = ObjCreate("Shell.Explorer") $oActiveX = GUICtrlCreateObj( $oIE, 5, 53 , 287 , 280 ) $oIE.navigate(ss) GUISetState(@SW_SHOW) While sleep(150) WEnd Func _Exit() GUIDelete($Form1) $oIE = "" Exit EndFunc


This does work:
AutoIt         
#RequireAdmin #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <TabConstants.au3> #include <EditConstants.au3> #include <GUIEdit.au3> Opt("GUIOnEventMode", 1) $Form1 = GUICreate("Form1", 541, 450, -1, -1, BitOR($GUI_SS_DEFAULT_GUI,$WS_CLIPCHILDREN)) ;GUICtrlCreateLabel("Name:", 344, 232, 35, 17,"", $WS_EX_TRANSPARENT) GUISetState(@SW_SHOW) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $Form2 = GUICreate("Form2", 297, 337, 16, 70, $WS_CHILD, "", $Form1) $TabGrp2 =GUICtrlCreateTab( 1,1,295,335) $Tab2 = GUICtrlCreateTabItem("test") $Tab3 = GUICtrlCreateTabItem("test2") $oIE = ObjCreate("Shell.Explorer") $oActiveX = GUICtrlCreateObj( $oIE, 5, 53 , 287 , 280 ) $oIE.navigate(ss) GUISetState(@SW_SHOW) While sleep(150) WEnd Func _Exit() GUIDelete($Form1) $oIE = "" Exit EndFunc


Any help here would be much appreciated. I'm at my witts' end.

Edited by KBcool, 01 September 2012 - 03:50 AM.











0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users