Customizing the Login Process
| Key |
Client |
Server |
 |
ConnectAction, caCustomConnect
|
|
 |
|
|
 |
OnCustomConnect |
|
Many developers want to create a custom login screen for their
users. A custom login provides you with the opportunity to present a
promotional splash screen or even an advertising opportunity.
If you select the caCustomConnect option of the AstaClientSocket's
ConnectAction property, then you can customize a login screen. If you
select this option, you can display your login screen from within the
OnCustomConnect event handler. In that event handler, you have access
to the AstaClientSocket and all of its properties. You must set the
Address and Port property or the Host and Port property. Those
properties become your responsibility when implementing a custom login.
procedure TForm1.AstaClientSocket1CustomConnect(Sender: TObject);
begin
// CALL YOUR CUSTOM LOGIN SCREEN HERE
// SET USERNAME, PASSWORD, AND OTHER PROPERTIES
// YOU MUST SET THE ADDRESS (OR HOST) AND PORT
AstaClientSocket1.Address := '206.210.19.131';
AstaClientSocket1.Port := 8080;
end;
|