InputPw.~pas
资源名称:srmsrc.zip [点击查看]
上传用户:tj00001
上传日期:2007-01-07
资源大小:672k
文件大小:2k
源码类别:
行业应用
开发平台:
Delphi
- //---------------------------------------------------------------------------
- //(R)CopyRight KivenSoft International ,inc 1999
- //单元名称:口令对话框
- //程序名称:电子书库
- //作 者:李会文
- //开始时间:1998.07.28
- //最后修改:1999.06.25
- //备注:此单元定义了SRM文件的读写接口
- //---------------------------------------------------------------------------
- unit InputPw;
- interface
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, Buttons, ExtCtrls, KvLabel;
- type
- TInPwForm = class(TForm)
- Edit: TEdit;
- CancelSpeedButton: TSpeedButton;
- OkSpeedButton: TSpeedButton;
- Bevel1: TBevel;
- InputLabel: TKvLabel;
- procedure FormKeyPress(Sender: TObject; var Key: Char);
- procedure CancelSpeedButtonClick(Sender: TObject);
- procedure OkSpeedButtonClick(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- InPwForm: TInPwForm;
- implementation
- {$R *.DFM}
- procedure TInPwForm.FormKeyPress(Sender: TObject; var Key: Char);
- begin
- if Key=#13 then OkSpeedButtonClick(self);
- if Key=#27 then CancelSpeedButtonClick(self);
- end;
- procedure TInPwForm.CancelSpeedButtonClick(Sender: TObject);
- begin
- Edit.Text:='';
- ModalResult:=mrCancel;
- end;
- procedure TInPwForm.OkSpeedButtonClick(Sender: TObject);
- begin
- ModalResult:=mrOk;
- end;
- procedure TInPwForm.FormCreate(Sender: TObject);
- begin
- CancelSpeedButton.Glyph.LoadFromResourceName(HInstance,'CANCELBMP');
- OkSpeedButton.Glyph.LoadFromResourceName(HInstance,'OKBMP');
- end;
- end.