本帖最后由 冥界3大法王 于 2019-8-19 18:25 编辑
[Delphi] 纯文本查看 复制代码 unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Edit2: TEdit;
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
result:integer;
implementation
{$R *.dfm}
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
If (Key<>chr(16)) and (Edit1.Text<>'') then
Begin
result:=StrToInt(Edit1.Text) Xor 468885152;
Edit2.Text:=IntToStr(result);
End;
end;
end.
|