[Gambas-user] Only One Active Form at same time

Steven Drinnan steven at ...1545...
Fri Feb 22 13:44:55 CET 2008


Try

Me.visible = False
Form2.show
me.close

That way the form should hide itself first then open up the next form
for you.

having it the way that you have could have the form closing with out
finishing its code in that block. (Even though technically your code is
right ) It always better to open forms first before closing the current
form it something I learnt when I was using VB more. (Old VB days
haunting me) 

Steven 

On Thu, 2008-02-21 at 18:18 -0800, Nx GT-R BOY wrote:
> Hi, I was wondering how to have only one form opened, I mean, If I have a
> button1 inside a form1 I want to close form1 and open form2, instead of have
> 2 opened windows.
> 
> The problem is that I found a way to do it but works only with a few forms,
> I really don't know what is wrong in other forms.
> 
> The code is as simple as:
> Me.close(TRUE)
> Form2.show
> 
> I don't know if thats the way to do it, but works in a few forms.
> 
> Is there a "good" way to do it, working in all forms?
> 
> Thanks in advance





More information about the User mailing list