In our application, the login is a mandatory action so we do a simple thing:
develop a login form, adding the following to be the first form displayed:
initialization
RegisterMainFormClass(TfrmLogin);
and deleting similar lines in the MainForm
If the login succeeds, simply initialize what you need and do:
frmLogin.Hide;
frmMain.Show;
All session flags and shared information, we put them in MainModule .pas as public members of TUni MainModule , so they are available for all session forms through Uni MainModule function (be sure that MainModule is present under "uses" clause of your forms).
It is very simple, but it works for us...
Regards,
develop a login form, adding the following to be the first form displayed:
initialization
RegisterMainFormClass(TfrmLogin);
and deleting similar lines in the MainForm
If the login succeeds, simply initialize what you need and do:
frmLogin.Hide;
frmMain.Show;
All session flags and shared information, we put them in MainModule .pas as public members of TUni MainModule , so they are available for all session forms through Uni MainModule function (be sure that MainModule is present under "uses" clause of your forms).
It is very simple, but it works for us...
Regards,