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.

相关阅读 >>

Delphi xe tparallel.for循环

Delphi repeat until 随机插入

Delphi listbox用canvas属性绘图

Delphi 提高unigui开发效率的两个方法

Delphi读取文本文件的最后一行

Delphi线程中关闭程序

Delphi 判断网站文件是否存在

Delphi中操作powerpoint幻灯片的示例代码

Delphi qq表情的实现

Delphi 游戏是如何检测到有od等调试工具的

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...