bikerbrooks Posted November 24, 2015 Posted November 24, 2015 Right i hope i have this right now i just need little help on embeding ie 11 under a gui tab ie 11 opens embeds perfectly and you resize whatever just unable to get it to stay updaer tab 1 ;IE11 code to embed ;Func _ProcessCloseEx($sPID) is better use over _iequit() #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPI.au3> #include <Constants.au3> #include <IE.au3> $STARTERPACK = GUICreate("TEST", 1261, 704, 189, 125) $PageControl1 = GUICtrlCreateTab(0, 0, 1258, 700) $TabSheet1 = GUICtrlCreateTabItem("TEST TAB 1") ;IE 11 TO GO HEREexpandcollapse popup$TabSheet2 = GUICtrlCreateTabItem("TEST TAB 2") GUICtrlSetState(-1, $GUI_SHOW) $Label5 = GUICtrlCreateLabel("HELLO MOM", 16, 145, 202, 17) GUICtrlSetFont(-1, 8, 400, 0, "Arial") GUISetState(@SW_SHOW) Local $pid, $hHandle, $hGUI, $sURL, $xHeight, $xWidth $sURL = "about:blank" $xWidth = 800 $xHeight = 600 $hGUI = GUICreate("Test", $xWidth, $xHeight) $oIE = _IECreateEmbed2(500, 500, 10, 10, $hGUI) _IENavigate($oIE, "www.google.com") Func _IECreateEmbed2($xWidth, $xHeight, $iX, $iY, $hGUI) $pID = Run(@ProgramFilesDir & "\internet explorer\iexplore.exe -k " & $sURL, "", @SW_HIDE) Do Sleep(100) Until Not (ProcessExists($pID) = 0) $hHandle = _ProcessGetHWnd($pID) Do $oIElocal = _IEAttach($hHandle, "HWND") Sleep(100) Until $oIElocal <> 0 GUISetState(@SW_SHOW, $hGUI) _WinAPI_SetParent($hHandle, $hGUI) _WinAPI_MoveWindow($hHandle, $iX, $iY, $xWidth, $xHeight, True) _WinAPI_SetWindowLong($hHandle, $GWL_STYLE, BitOR($WS_CHILD, $WS_VISIBLE)) Return $oIElocal EndFunc ;==>_IECreate2 Func _ProcessGetHWnd($iPid, $sTitle = "", $iTimeout = 2000) Local $aWin While 1 $aWin = WinList($sTitle) For $i = 1 To $aWin[0][0] If $iPid = WinGetProcess($aWin[$i][1]) Then Return $aWin[$i][1] EndIf Next Sleep(500) ; add a timer here WEnd SetError(1) Return 0 EndFunc ;==>_ProcessGetHWnd Do Sleep(50) Until GUIGetMsg() = $GUI_EVENT_CLOSE _ProcessCloseEx("iexplore.exe") Func _ProcessCloseEx($sPID) If IsString($sPID) Then $sPID = ProcessExists($sPID) If Not $sPID Then Return SetError(1, 0, 0) Return Run(@ComSpec & " /c taskkill /F /PID " & $sPID & " /T", @SystemDir, @SW_HIDE) EndFunc
Moderators Melba23 Posted November 24, 2015 Moderators Posted November 24, 2015 bikerbrooks,As I said in our PM exchange, the Tabs tutorial in the Wiki explains how to manage non-native controls within a tab structure - you need to hide/show them yourself depending on the selected tab.M23 bikerbrooks 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
bikerbrooks Posted November 24, 2015 Author Posted November 24, 2015 just as i sent this you replied and im looking into in now thanks
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now