Board index » delphi » Close forms

Close forms


2003-11-15 05:08:56 AM
delphi216
Hey
I'm making a program with several forms. The first form is a loginform.
Within this form it is possible to change the password. Therefor I have to
close the first form and open the second form.
The problem is that when I say "form1.close" that the whole program stops.
When I say "form1.hide" it works but the problem is that when I close the
program I always have to write in the code that the first form also has to
be closed.
Can anybody teel me how to resolve that problem ?
MiguŽl
 
 

Re:Close forms

On Fri, 14 Nov 2003 22:08:56 +0100, MiguŽl<XXXX@XXXXX.COM>said ...
Quote
Hey

I'm making a program with several forms. The first form is a loginform.
Within this form it is possible to change the password. Therefor I have to
close the first form and open the second form.
The problem is that when I say "form1.close" that the whole program stops..
When I say "form1.hide" it works but the problem is that when I close the
program I always have to write in the code that the first form also has to
be closed.
Can anybody teel me how to resolve that problem ?
The first form that you create (not necessarily show) will be the
application's main form and controls the application's lifetime. When
this form is closed the application will terminate.
In project/options make the second form your first main form and find
another way to show the login form. How you show it depends on exactly
what it needs to do.
Marc
 

Re:Close forms

thx Marc
I thought that was the problem but wasn't sure.
MiguŽl
"Marc Rohloff" <marc rohloff at bigfoot dot com>schreef in bericht
On Fri, 14 Nov 2003 22:08:56 +0100, MiguŽl<XXXX@XXXXX.COM>said ...
Quote
Hey

I'm making a program with several forms. The first form is a loginform.
Within this form it is possible to change the password. Therefor I have to
close the first form and open the second form.
The problem is that when I say "form1.close" that the whole program stops.
When I say "form1.hide" it works but the problem is that when I close the
program I always have to write in the code that the first form also has to
be closed.
Can anybody teel me how to resolve that problem ?
The first form that you create (not necessarily show) will be the
application's main form and controls the application's lifetime. When
this form is closed the application will terminate.
In project/options make the second form your first main form and find
another way to show the login form. How you show it depends on exactly
what it needs to do.
Marc