Jump to content

Recommended Posts

Posted (edited)

Yes. I'm currently working on a project which requires two windows...

#include <Guiconstants.au3>
    

        $gui = GuiCreate("Window 1",200, 200, -1, -1, -1); Main gui
             Guisetstate()
                
    While 1
          $msg2 = Guigetmsg()

               Select
                               case $msg2 = $GUI_EVENT_CLOSE
                exit
endselect
 
 $gui2 = GuiCreate("Window 2",200,200, -1, -1, $WS_SYSMENU, $WS_EX_TOOLWINDOW); Toolbar window
         guisetstate()             
                        
    While 2
          $msg = Guigetmsg()
                 
             Select
                  case $msg = $GUI_EVENT_CLOSE
                      exit; Or you could hide it with Winsetstate()
              endselect

      wend
   wend

:) Hope it works out for you

Edited by eynstyne
F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent]
Posted

try:

$main = guicreate("Main", 300, 300)
$but = guictrlcreatebutton ("Button", 10, 10)
guisetstate()
$child = guicreate ("2nd", 300, 300, 0, 0, -1, -1, $main)
$minibut = guictrlcreatebutton ("Button 2", 10, 10)
guisetstate()
while 1
$msg = guigetmsg()
if $msg = $GUI_EVENT_CLOSE and winactive ($main) then exit
if $msg = $GUI_EVENT_CLOSE and winactive ($child) then msgbox (0, "Child", "Exit called")
if $msg = $but then msgbox (0, "Button pressed", "Button on Main-GUI pressed!")
if $msg = $minibut then msgbox (0, "Button pressed", "Button on 2nd GUI pressed!")
wend

this should cover your questions

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...