{************************************************************************} { } { Borland Delphi Visual Component Library } { InterBase Express core components } { } { Copyright (c) 1998-2000 Inprise Corporation } { } { InterBase Express is based in part on the product } { Free IB Components, written by Gregory H. Deatz for } { Hoagland, Longo, Moran, Dunst & Doukas Company. } { Free IB Components is used under license. } { } { The contents of this file are subject to the InterBase } { Public License Version 1.0 (the "License"); you may not } { use this file except in compliance with the License. You } { may obtain a copy of the License at http://www.Inprise.com/IPL.html } { Software distributed under the License is distributed on } { an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either } { express or implied. See the License for the specific language } { governing rights and limitations under the License. } { The Original Code was created by InterBase Software Corporation } { and its successors. } { Portions created by Inprise Corporation are Copyright (C) Inprise } { Corporation. All Rights Reserved. } { Contributor(s): Jeff Overcash } { } {************************************************************************} unit IBDialogs; interface uses SysUtils, Windows, Messages, Classes, Graphics, Controls, Forms, StdCtrls, ExtCtrls, DBLogDlg; function ServerLoginDialog(const AServerName: string; var AUserName, APassword: string): Boolean; implementation function ServerLoginDialog(const AServerName: string; var AUserName, APassword: string): Boolean; begin with TLoginDialog.Create(nil) do try Caption := 'InterBase Server Login'; Label3.Caption := 'Server Name: '; DatabaseName.Caption := AServerName; UserName.Text := AUserName; Result := False; if AUserName = '' then ActiveControl := UserName; if ShowModal = mrOk then begin AUserName := UserName.Text; APassword := Password.Text; Result := True; end; finally Free; end; end; end.