I tried this simple code: Private w As Window
Public Sub Form_Open() With w = New Window .W = 100 .H = 100 .X = 0 .Y = 0 .Show End With With w = New Window .W = 100 .H = 100 .X = 200 .Y = 100 .Show End With With w = New Window .W = 100 .H = 100 .X = 300 .Y = 200 .Show End With Me.Center Application.MainWindow = Me ' and also: = Fmain End When you launch the program, 3 windows open. Then, if you close the main Form of application, those three windows close too. bye vuott -------------------------------------------- Mar 27/8/13, Kende Krisztián <n...@freemail.hu> ha scritto: Oggetto: Re: [Gambas-user] List of Open Forms? A: gambas-user@lists.sourceforge.net Data: Martedì 27 agosto 2013, 15:28 > Application.MainWindow = Me > > > > so, it works. Yeah, but it is not clear: Static Property MainWindow As Window RETURNS the main window of the application. The main window is the FIRST CREATED WINDOW or form in your application. Closing the main window implies closing all other opened windows and quitting the application. If closing the first created main window, the secondary created is not closed. But if SET the MainWindow, then works. So first created window is not main window, and it is possible to change the MainWindow value. ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user