sybaselogin.pas

来自「sybase大全」· PAS 代码 · 共 49 行

PAS
49
字号
unit sybaselogin;

interface

uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
  Buttons, ExtCtrls,dialogs, sybdatabase;

type
  TPasswordDlg = class(TForm)
    Label1: TLabel;
    Password: TEdit;
    OKBtn: TButton;
    CancelBtn: TButton;
    username: TEdit;
    Label2: TLabel;
    Label3: TLabel;
    Bevel1: TBevel;
    server: TComboBox;
    procedure FormActivate(Sender: TObject);
    procedure serverChange(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  PasswordDlg: TPasswordDlg;

implementation

{$R *.DFM}

procedure TPasswordDlg.FormActivate(Sender: TObject);
begin
  if (length(username.text) > 0)
    and (length(Server.text) > 0) then
  password.setfocus;
end;

procedure TPasswordDlg.serverChange(Sender: TObject);
begin
  if length(Server.Text) > 0 then
    Caption:='Login to ' + Server.Text;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?