=sinister= Posted August 6, 2008 Share Posted August 6, 2008 I have 2 GUI windows, the main one and an options one. However, once the script begins, the script adds a control to the gui (And adds controls to the GUI alot afterwards), but instead of adding it to the main GUI, it adds the control to the options GUI. ;Simple example $Mainwindow = GUICreate("Test", -1, -1, 500, 500) $Optionswindow = GUICreate("Options Test", -1, -1, 350, 350) GUISetState(@SW_Show, $MainWindow) GUISetState(@SW_Hide, $OptionsWindow) CreateLabel() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 exit EndSwitch WEnd Func CreateLabel() GUICtrlCreateLabel("Test", 20, 20, 20, 20) EndFunc Notice how it places it on the Options window. Now a good solution to this would be create the options window first, but since I use the function alot, if I open the options window the function will not work anymore. Link to comment Share on other sites More sharing options...
muhmuuh Posted August 6, 2008 Share Posted August 6, 2008 I think GUISwitch() would solve your problem I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more. Link to comment Share on other sites More sharing options...
=sinister= Posted August 6, 2008 Author Share Posted August 6, 2008 I was not aware that this function existed! hah, thanks. 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