1 (edited by CDB 2021-02-21 06:24:44)

Topic: Re loading the login dialogue from

I have had to instigate a logout button in my little program and it struck me that when someone has logged out, it  would be a nice touch to allow them to log in again in case they had hit the logout button accidently.

The built in login form can be re-introduced by

frmDBCoreLogin.Show or ShowModal

, however as the main form is still open the login form is not able to work.

Apart from building my own login form, can anyone out there in MVD land think of a way to press the inbuilt login form into service to allow a relogin in?

On a clear disk you can seek forever

2 (edited by derek 2021-02-21 13:17:24)

Re: Re loading the login dialogue from

Doesn't exactly answer your question, but rather than redisplay the login form, might a simpler approach be to ask the user to confirm that they intended to log off (see attached as an option - passwords are the same as userid's)?

Post's attachments

Attachment icon cdb logoff.zip 341.49 kb, 262 downloads since 2021-02-21 

3 (edited by CDB 2021-02-21 18:30:46)

Re: Re loading the login dialogue from

Hi Derek,

What you have suggested was my original idea, and then I thought I'd use the MessageDlgTimeOut  function, which would have been perfect if I hadn't discovered it doesn't return the 'flags' value (http://myvisualdatabase.com/forum/viewt … 199#p40199) .

I'll see how my current incarnation goes using the above function to close the program, and if it turns out the users are even more incapable in using a logout button than just closing the program, I'll institute my own close program timer with code similar to yours.

Thank you for the reply.

On a clear disk you can seek forever