Multiple forms

Just starting out? Need help? Post your questions and find answers here.
ClueLess
Enthusiast
Enthusiast
Posts: 345
Joined: Sun Jan 11, 2009 1:04 am

Multiple forms

Post 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
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: Multiple forms

Post 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.
oh... and have a nice day.
zikitrake
Addict
Addict
Posts: 834
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Re: Multiple forms

Post 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
ClueLess
Enthusiast
Enthusiast
Posts: 345
Joined: Sun Jan 11, 2009 1:04 am

Re: Multiple forms

Post 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
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: Multiple forms

Post 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.
oh... and have a nice day.
Post Reply