Page 1 of 1

Multiple forms

Posted: Fri Feb 05, 2010 1:32 pm
by ClueLess
I'm designing an application whitch uses multiple forms. However when I open one form the one bellow disapears. How can I avoid that and mantain all forms on the screen?

Thank You

Re: Multiple forms

Posted: Fri Feb 05, 2010 1:42 pm
by Kaeru Gaman
provide a new Window-Number for each form.
you can open the new Window using #PB_Any and store the returnvalue in a LList.
also, when using multiple Windows of the same layout, create ALL Gadgets on these with #PB_Any to make sure they have unique IDs.
and better use one single EventLoop for all your Windows.

Re: Multiple forms

Posted: Fri Feb 05, 2010 1:45 pm
by zikitrake
ClueLess wrote:I'm designing an application whitch uses multiple forms. However when I open one form the one bellow disapears. How can I avoid that and mantain all forms on the screen?

Thank You
Can be this?:

Code: Select all

OpenWindow(0,10,10,400,200, "Hi, I'm the window one")
OpenWindow(1,380,100,400,200, "Hi, I'm the window two, Pushme")

StickyWindow(0, #True)

Repeat: Until WindowEvent()=#PB_Event_CloseWindow

Re: Multiple forms

Posted: Mon Feb 08, 2010 9:00 am
by ClueLess
I did'n tell (did'n think it was important) that the forms are called from a menubar. The main form is OK. stays visible all the time. I call the second one and it stays on top of the main one, but when I call the third, the second disapear from the screen. What I would like is keeping all forms visible.

Thanks

Re: Multiple forms

Posted: Mon Feb 08, 2010 1:40 pm
by Kaeru Gaman
this is nothing immanent, but you are making a fundamental mistake.
my suspect is, you are reusing the ID of the first window.
however, without checking your code we can't tell nothing.