Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2018, 08:56 AM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 295
Default Close calling form.

I see this has been asked a few times on other forums but non have given me a solution I would like to use.

I have a login screen. Once the user has logged in with valid details, I want to permanently close the login page and go to the main page.

It was suggested to hide the login page, well it does that very well. The form remains open but not visible. Not even the task manager listed it as running, but I got an error on recompile saying could not create EXE as if it was still running. Had to do a reboot.
Reply With Quote
  #2  
Old 06-12-2018, 01:45 PM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,288
Default

Since it's probably the first form you create it's seen as the MainForm.
And that's not what it is, it's a helper form. Hiding it is useless, and closing the main page will not close the application, since the MainForm is still running.
Try implementing it as if it was a FileOpenDialog (or whatever). Don't create the form unless you need it. And don't keep it open and hidden, it has no purpose anymore so it should be closed.

And for your information, instead of a reboot you could've easily ended the process in the Task Manager, saves you some time
Reply With Quote
  #3  
Old 06-12-2018, 05:09 PM
rojam rojam is offline
Senior Member
 
Join Date: Jun 2015
Posts: 180
Default

try implementing a log in page as detailed here.

https://www.thoughtco.com/display-a-...dialog-1058469
Reply With Quote
  #4  
Old 06-12-2018, 09:00 PM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 295
Default

Quote:
Originally Posted by Norrit View Post
And for your information, instead of a reboot you could've easily ended the process in the Task Manager, saves you some time
The task manager did not list the program. Not even listed in running tasks. I tried to delete the exe and the message was, file in use.

Guess just another bug with Delphi 10.1 and some memory leaks or something like that. Also Run reset is greyed out in the IDE. Delphi 6 is looking better and better !!!

What I want is a login in screen and this is the first thing a user sees. Once logged in the Main form then displays what they can or cant see.

Guess I could put this on the main form and hide everything until they have logged in and then update the view.
Reply With Quote
  #5  
Old 06-12-2018, 09:02 PM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 295
Default

Quote:
Originally Posted by rojam View Post
try implementing a log in page as detailed here.

https://www.thoughtco.com/display-a-...dialog-1058469

Thanks Excellent reply. Just what I wanted.
Reply With Quote
  #6  
Old 06-13-2018, 06:49 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,288
Default

Quote:
Guess just another bug with Delphi 10.1 and some memory leaks or something like that. Also Run reset is greyed out in the IDE. Delphi 6 is looking better and better !!!
And you think this wouldn't happen in Delphi 6? Please, don't make the mistake on going back to Delphi 6...
Reply With Quote
  #7  
Old 06-13-2018, 10:59 AM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 295
Default

Ok I found out that the Grey out is caused by not running in Debug mode. I customized the screen and lost the debug option. Now fixed.

Still the app was hidden and still running so that was a cause for concern.

Delphi 6 loads quicker, comes on a CD (not 6 GB) and so far never found a bug. On the other hand I do complex solutions to problems with simple code.

Only real reason to go to 10 is if I want to develop for multiple OS.

I'm really only doing interfaces with SQL and serial ports.

10 has just got too much stuff.

Thanks for the help.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 02:01 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2018, vBulletin Solutions, Inc.