Page 1 of 1

Custom Login Form issue

Posted: Thu 19 Jan 2006 15:42
by swierzbicki
Hi,

I have a small issue with my custom login dialog box (based upon your exemple).

In design time, I set the MyConnection.Server to 'localHost'
On run time , in my oncreateform event , I read registries values and in my case change the Connection.server value from 'localhost' to '192.168.1.1'.

When I'm connecting, the lcustom ogin dialog box correctly appears but the server address is still to localhost !

So, I checked the "DoInit" method :
lbUsername.Caption := FConnectDialog.UsernameLabel;
lbPassword.Caption := FConnectDialog.PasswordLabel;
lbServer.Caption := FConnectDialog.ServerLabel;
btvalider.Caption := FConnectDialog.ConnectButton;
btannuler.Caption := FConnectDialog.CancelButton;

FConnectDialog.GetServerList(edServer.properties.Items);
edServer.text:= FConnectDialog.Connection.server ;
edServer.text:= FConnectDialog.Connection.server is still set with the design time value and not the runtime value !.
Is there a way to refresh the FConnectDialog.Connection object ?

Posted: Thu 19 Jan 2006 16:05
by swierzbicki
It looks like the TMyCOnnection.Server is overwriten with the latest "server hostname / ip address" stored in the registry (DBAccess.pas).

It is possible to bypass this behavior ?

Posted: Fri 20 Jan 2006 15:04
by Ikar
You should use MyConnectionDialog with property StoreLogInfo set to False.