Feonixx Posted July 5, 2008 Author Posted July 5, 2008 It's actually a problem with your GUIGetMsg() call i think. this is sloppy, but it works i guess. I'm sure there is a more efficient way to do it though :\ EDIT: Personally, I would use OnEvent mode for any GUI with more than one window open at the same time... $Main = GUICreate("Title - Main",150,350) GUISetBkColor(0x000000) $Input = GUICtrlCreateButton("Button 1",5,10,140,20) $Input2 = GUICtrlCreateButton("Button 2",5, 50, 140, 20) MsgBox(0,'Title', "Made By: Feonix") GUISetState(@SW_SHOW, $Main) While 1 $Msg = GUIGetMsg() Switch $Msg Case -3;$GUI_EVENT_CLOSE Exit Case $Input $GUI1 = GUICreate("Button Window",150,200) GUISetState(@SW_SHOW, $GUI1) Do $Msg2 = GUIGetMsg(1) Until $Msg2[1] = $GUI1 and $Msg2[0] = -3;$GUI_EVENT_CLOSE GUIDelete($GUI1) EndSwitch WEnd So, basically this is saying, For case 1, if the program is instructed to close it will exit. Then, for case 2, being the button being clicked, it will do function GUI1 which is assigned to create a new window. This will DO the refreshing until the window is closed? And if i needed a 2nd button to open in a window, then id add another Case, being case 3 with attributes similar to the 2nd case.? Please correct me if i am wrong, just trying to grasp this concept D:
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