notta Posted May 9, 2012 Share Posted May 9, 2012 (edited) I have a child window inside of my main window that has a tab control with a scrollbar. Everything is working fine except for a few little annoyances. When I minimize the window it works fine, but when I click on the window to bring it back I see the child window display instantly and then the parent window comes in behind it a second later. Also, I have another issue that when the window is open for a while and I come back to it the child window is shifted to the right and is extending outside the bounds of the parent window. I have not been able to narrow down when this happens, but it has happened quite a few times. If someone has a chance please take a look and see if you see the same thing. Thanks. expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <TabConstants.au3> #include <GUIScrollbars_Ex.au3> #include <StringSize.au3> #include <EditConstants.au3> #include <ComboConstants.au3> $xWidth = 800 $xHeight = 600 $iPadRight = 20 $iPadBottom = 20 $eColor = 0x80FF80 $oColor = 0xffffff $Form1 = GUICreate("My GUI", $xWidth, $xHeight) ; will create a dialog box that when displayed is centered $tab1 = GUICtrlCreateTab(0,10,$xwidth,490) $t1 = GUICtrlCreateTabItem("Tab 1") $t2 = GUICtrlCreateTabItem("Tab 2") $t3 = GUICtrlCreateTabItem("Tab 3") $t4 = GUICtrlCreateTabItem("Tab 4") $t5 = GUICtrlCreateTabItem("Tab 5") $t6 = GUICtrlCreateTabItem("Tab 6") GUICtrlCreateTabItem("") $hTab_Win0 = GUICreate("Test", $xWidth - 20, 400, 10, 50, $WS_POPUP, $WS_EX_MDICHILD, $Form1) GUISetBkColor(0xffffff) _GUIScrollbars_Generate($hTab_Win0, 0,400) GUISetState(@SW_SHOW, $Form1) GUISetState(@SW_SHOW, $hTab_Win0) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $Tab1 Then _Tab() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete($hTab_Win0) GUIDelete($Form1) Func _Tab() Switch GUICtrlRead($tab1) Case 0 GUISetState(@SW_SHOW, $hTab_Win0) Case 1 GUISetState(@SW_HIDE, $hTab_Win0) Case 2 GUISetState(@SW_HIDE, $hTab_Win0) Case 3 GUISetState(@SW_HIDE, $hTab_Win0) Case 4 GUISetState(@SW_HIDE, $hTab_Win0) Case 5 GUISetState(@SW_HIDE, $hTab_Win0) EndSwitch EndFunc Edited May 9, 2012 by notta Link to comment Share on other sites More sharing options...
armoros Posted May 9, 2012 Share Posted May 9, 2012 (edited) Hello Notta i tested your script but it runs ok with no problems... I use xp sp3... i just say that because i had read in the forum that some times Gui's looks different in xp or w7... Maybe im wrong but it works fine... Edited May 9, 2012 by armoros [font="verdana, geneva, sans-serif"] [/font] Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 9, 2012 Moderators Share Posted May 9, 2012 notta, I too see no problems when minimizing/restoring the GUI nor any displacement of the child GUI (after about 20 minutes visible). I am using Vista x32. M23  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  Link to comment Share on other sites More sharing options...
notta Posted May 9, 2012 Author Share Posted May 9, 2012 Thanks guys. The issue is happening on my Windows 7 machine. I have verified that the child window delay does not happen on Windows XP. I built the test file and had a co-worker run it on his Windows 7 machine and he also sees the delay. I don't have a Vista machine so I can't test that. Anyone have a 7 box they can test it on? Link to comment Share on other sites More sharing options...
armoros Posted May 9, 2012 Share Posted May 9, 2012 (edited) I did testit in my sisters w7 x32 pc i executed compiled but no problem..here is the screenshotsXP-sp3 w7 x 32 I am sorry notta i am fool my sister has Vista x32 too sorry would love to help but..... Edited May 9, 2012 by armoros [font="verdana, geneva, sans-serif"] [/font] Link to comment Share on other sites More sharing options...
notta Posted May 9, 2012 Author Share Posted May 9, 2012 (edited) haha, thanks anyway man. I have verified it on a 3rd Windows 7 machine so something is wrong. Edited May 9, 2012 by notta Link to comment Share on other sites More sharing options...
armoros Posted May 9, 2012 Share Posted May 9, 2012 Dont know if that helps notta but try this...you never know...Pass the Handle of the Parent GUI to the Child GUI using the 'Parent Parameter' and then Disable the Parent GUI. GUICreate ( "title" [, width [, height [, left [, top [, style [, exStyle [, parent]]]]]]] )Example #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <GUIConstantsEx.au3> Global $hParentGUI _Main() Func _Main() Local $iButton_1 $hParentGUI = GUICreate("Example by guinness", 200, 200, -1, -1) $iButton_1 = GUICtrlCreateButton("Show MsgBox()", 10, 10, 85, 25) GUISetState(@SW_SHOW, $hParentGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $iButton_1 GUISetState(@SW_DISABLE, $hParentGUI) _ChildGUI() GUISetState(@SW_ENABLE, $hParentGUI) EndSwitch WEnd EndFunc ;==>Main Func _ChildGUI() GUICreate("Custom MsgBox()", 200, 200, -1, -1, -1, -1, $hParentGUI) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete() ExitLoop EndSwitch WEnd EndFunc ;==>_ChildGUI [font="verdana, geneva, sans-serif"] [/font] Link to comment Share on other sites More sharing options...
armoros Posted May 9, 2012 Share Posted May 9, 2012 (edited) Hey Notta i know im not helpful but here is a last thing you should try if you wish untill someone with w7 and better knowledge than me help you better...page__view__findpost__p__975594 GUICtrlCreateTabitem("") Edited May 9, 2012 by armoros [font="verdana, geneva, sans-serif"] [/font] 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