JavaScript_Freek Posted August 19, 2006 Share Posted August 19, 2006 Ok the problem is the thing is offseted. I was wondering if anyone could make the browser page and the tabs neat. CODE ; ******************************************************* ; Nelmen Browser by keen ; Special thanks to Dan! ; ******************************************************* ; #include <GUIConstants.au3> #include <IE.au3> #include <GuiTab.au3> global $tabcount = 1 dim $aTabs[1] _IEErrorHandlerRegister () GUISetState() ;Show GUI $gui = GUICreate("Nelmen Browser", 1000, 850, _ (@DesktopWidth - 1300) / 2, (@DesktopHeight - 870) / 2, _ $WS_MAXIMIZE + $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) GUICtrlSetResizing (-1,$GUI_DOCKMENUBAR+$GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKBOTTOM) $size = WinGetClientSize($gui) $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30) $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30) $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30) $GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30) $GUI_Button_AddTab = GUICtrlCreateButton ("Add Tab", 10, 10, 100) $tab=GUICtrlCreateTab (3,60, 875,610) GUICtrlSetResizing (-1,$GUI_DOCKMENUBAR+$GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKBOTTOM) $oIE = _IECreateEmbedded () $GUIActiveX = GUICtrlCreateObj($oIE, 10, 100, 870, 600) addtab() GUISetState() ;Show GUI _IENavigate ($oIE, "http://www.zetastyles.com") ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_Home _IENavigate ($oIE, "http://www.zetastyles.com") Case $msg = $GUI_Button_Back _IEAction ($oIE, "back") Case $msg = $GUI_Button_Forward _IEAction ($oIE, "forward") Case $msg = $GUI_Button_Stop _IEAction ($oIE, "stop") Case $msg = $GUI_Button_AddTab addtab() EndSelect WEnd func addtab() redim $aTabs[$tabcount] $aTabs[$tabcount-1] = GUICtrlCreateTabitem ("Tab "&$tabcount) GUICtrlSetResizing (-1,$GUI_DOCKMENUBAR+$GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKBOTTOM) GUICtrlSetStyle(-1,$WS_VISIBLE) GUICtrlCreateTabitem (""); end tabitem definition $tabcount += 1 EndFunc GUIDelete() Exit [center]Cookyx.com :: Simple LAN Chat[/center] Link to comment Share on other sites More sharing options...
CWorks Posted August 19, 2006 Share Posted August 19, 2006 (edited) this code gives loads of errors but does work this will put the main window in center your code for this was all wrong $gui = GUICreate("Nelmen Browser", 1000, 850, -1, -1, $WS_MAXIMIZE + $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) not sure what else to fix first $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 720, 100, 30) $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 720, 100, 30) $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 720, 100, 30) $GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 720, 100, 30) not sure what you want exactly but with resizing enabled you would need to have a way to change button position so i just gave it a static size i didn't fix your errors though expandcollapse popup; ******************************************************* ; Nelmen Browser by keen ; Special thanks to Dan! ; ******************************************************* ; #include <GUIConstants.au3> #include <IE.au3> #include <GuiTab.au3> Global $tabcount = 1 Dim $aTabs[1] _IEErrorHandlerRegister () GUISetState() ;Show GUI GUICreate("Nelmen Browser", 890, 760, -1, -1) $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 720, 100, 30) $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 720, 100, 30) $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 720, 100, 30) $GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 720, 100, 30) $GUI_Button_AddTab = GUICtrlCreateButton("Add Tab", 10, 10, 100) GUICtrlCreateTab(3, 60, 880, 645) $oIE = _IECreateEmbedded () GUICtrlCreateObj ($oIE, 10, 100, 870, 600) addtab() GUISetState() ;Show GUI _IENavigate ($oIE, "http://www.zetastyles.com") ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_Home _IENavigate ($oIE, "http://www.zetastyles.com") Case $msg = $GUI_Button_Back _IEAction ($oIE, "back") Case $msg = $GUI_Button_Forward _IEAction ($oIE, "forward") Case $msg = $GUI_Button_Stop _IEAction ($oIE, "stop") Case $msg = $GUI_Button_AddTab addtab() EndSelect WEnd Func addtab() ReDim $aTabs[$tabcount] $aTabs[$tabcount - 1] = GUICtrlCreateTabItem("Tab " & $tabcount) GUICtrlSetStyle(-1, $WS_VISIBLE) GUICtrlCreateTabItem(""); end tabitem definition $tabcount += 1 EndFunc Edited August 19, 2006 by CWorks Link to comment Share on other sites More sharing options...
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