?? unit2.pas
字號:
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, MyUtils;
type
TForm2 = class(TForm)
GroupBox1: TGroupBox;
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
Label1: TLabel;
procedure FormActivate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
UserID: WORD;
DialogType: integer;
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.FormActivate(Sender: TObject);
begin
if (DialogType and $80000000) <> 0 then
Caption := 'Settings'
else
Caption := 'Change sChip UserID';
Edit1.Text := IntToHex(UserID, 4);
end;
procedure TForm2.Button1Click(Sender: TObject);
var
i: Integer;
begin
i := Str2Word(Edit1.Text);
if( i = -1) then
begin
MessageBox(Handle, '請輸入4個字符并且使用十六進制編碼字符。', 'Set UserID error', MB_OK);
Edit1.Clear();
exit;
end;
UserID := Word(i);
ModalResult := mrOk;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -