Hooch Posted October 24, 2004 Posted October 24, 2004 Hey all, I spent the day converting my script (couple thousand lines w/ 100+ controls) to 103. The conversion went smoothly thanks to that great script CyberSlug wrote however I am having problems. As multiple GUI's were not supported in 102 I just made a seperate exe for my "child" window. My problem is in trying to move to a proper parent child setup. I have both windows coming up independently of each other but my buttons are not reporting, even my tabs don't work. They switch but the controls on each tab dont display, only the controls that are on the primary tab. So I am hoping for an example script I can look at and maybe find my way again.
Hooch Posted October 24, 2004 Author Posted October 24, 2004 Hey all,I spent the day converting my script (couple thousand lines w/ 100+ controls) to 103. The conversion went smoothly thanks to that great script CyberSlug wrote however I am having problems.As multiple GUI's were not supported in 102 I just made a seperate exe for my "child" window. My problem is in trying to move to a proper parent child setup.I have both windows coming up independently of each other but my buttons are not reporting, even my tabs don't work. They switch but the controls on each tab dont display, only the controls that are on the primary tab. So I am hoping for an example script I can look at and maybe find my way again.<{POST_SNAPBACK}> no love...
jpm Posted October 24, 2004 Posted October 24, 2004 no love...<{POST_SNAPBACK}>just post sample of your script so we can help
SlimShady Posted October 24, 2004 Posted October 24, 2004 Here's an example: expandcollapse popup#include <GUIConstants.au3> AutoItSetOption("TrayIconDebug", 1) AutoItSetOption("WinTitleMatchMode", 4) ;Initialize variables Global $style1 Global $IniFile Global $GUIWidth Global $GUIHeight $GUIWidth = 250 $GUIHeight = 250 $IniFile = StringTrimRight(@ScriptFullPath, 3) & "ini" ;Only a close button: ;$style1 = BitOR($WS_POPUP, $WS_CAPTION, $WS_SYSMENU) ;GUICreate("New GUI", $GUIWidth, $GUIHeight, -1, -1, $style1) $ParentWin = GUICreate("Parent GUI", $GUIWidth, $GUIHeight) $ParentWin_Pos = WinGetPos("handle=" & $ParentWin, "") $ChildWin = GUICreate("Child GUI", $GUIWidth, $GUIHeight, $ParentWin_Pos[0] + 100, $ParentWin_Pos[1] + 100, -1, -1, $ParentWin) GUISetState(@SW_SHOW) GUISwitch($ParentWin) GUISetState(@SW_SHOW) While 1 Sleep(25) $msg = GUIGetMsg(1) Select Case $msg[0] = $GUI_EVENT_CLOSE If $msg[1] = $ParentWin Then MsgBox(64, "Test", "Parent GUI will now close.") GUISwitch($ParentWin) GUIDelete() Exit ElseIf $msg[1] = $ChildWin Then MsgBox(64, "Test", "Child GUI will now close.") GUISwitch($ChildWin) GUIDelete() EndIf ;Case $msg = ... EndSelect WEnd
Percius Posted October 24, 2004 Posted October 24, 2004 This was a string I started to Try and Get support for makeing a Child Window have a working scroll bar. It seams that feature is not yet implimented, but it shows you an example of a child window. Let me know if you have any questions.Just note that a "Child Window's Location is based on the parent window not the page location.My Webpage
Hooch Posted October 25, 2004 Author Posted October 25, 2004 Ahhh thanks a million guys, that was the kind of examples I needed, I now have it working! As well I knocked a 100kb off the program not having to compile a seperate exe ! Yay! Anyways thanks again, 103 is very nice....
Hooch Posted October 25, 2004 Author Posted October 25, 2004 just post sample of your script so we can help <{POST_SNAPBACK}>I didn't see your message there jp, I didn't post my script because it is a little complicated with lots of includes and conditionals so posting it would have created more confusion. Luckily the examples posted helped me out, I wasn't aware of the whole GUIswitch thing so my windows were displaying but not posting and events.
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