1 |
{************************************************************************} |
2 |
{ } |
3 |
{ Borland Delphi Visual Component Library } |
4 |
{ InterBase Express core components } |
5 |
{ } |
6 |
{ Copyright (c) 1998-2000 Inprise Corporation } |
7 |
{ } |
8 |
{ InterBase Express is based in part on the product } |
9 |
{ Free IB Components, written by Gregory H. Deatz for } |
10 |
{ Hoagland, Longo, Moran, Dunst & Doukas Company. } |
11 |
{ Free IB Components is used under license. } |
12 |
{ } |
13 |
{ The contents of this file are subject to the InterBase } |
14 |
{ Public License Version 1.0 (the "License"); you may not } |
15 |
{ use this file except in compliance with the License. You } |
16 |
{ may obtain a copy of the License at http://www.Inprise.com/IPL.html } |
17 |
{ Software distributed under the License is distributed on } |
18 |
{ an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either } |
19 |
{ express or implied. See the License for the specific language } |
20 |
{ governing rights and limitations under the License. } |
21 |
{ The Original Code was created by InterBase Software Corporation } |
22 |
{ and its successors. } |
23 |
{ Portions created by Inprise Corporation are Copyright (C) Inprise } |
24 |
{ Corporation. All Rights Reserved. } |
25 |
{ Contributor(s): Jeff Overcash } |
26 |
{ } |
27 |
{************************************************************************} |
28 |
|
29 |
unit IBDialogs; |
30 |
|
31 |
interface |
32 |
|
33 |
uses SysUtils, Windows, Messages, Classes, Graphics, Controls, |
34 |
Forms, StdCtrls, ExtCtrls, DBLogDlg; |
35 |
|
36 |
function ServerLoginDialog(const AServerName: string; |
37 |
var AUserName, APassword: string): Boolean; |
38 |
|
39 |
implementation |
40 |
|
41 |
function ServerLoginDialog(const AServerName: string; |
42 |
var AUserName, APassword: string): Boolean; |
43 |
begin |
44 |
with TLoginDialog.Create(nil) do |
45 |
try |
46 |
Caption := 'InterBase Server Login'; |
47 |
Label3.Caption := 'Server Name: '; |
48 |
DatabaseName.Caption := AServerName; |
49 |
UserName.Text := AUserName; |
50 |
Result := False; |
51 |
if AUserName = '' then ActiveControl := UserName; |
52 |
if ShowModal = mrOk then |
53 |
begin |
54 |
AUserName := UserName.Text; |
55 |
APassword := Password.Text; |
56 |
Result := True; |
57 |
end; |
58 |
finally |
59 |
Free; |
60 |
end; |
61 |
end; |
62 |
|
63 |
end. |