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 获取计算机串口列表

Delphi 枚举所有电脑磁盘

Delphi idpop3收邮件

winapi 字符及字符串函数(15): charnext、charprev

Delphi异常处理的基本原则和方法

用tidftp控件实现ftp协议

Delphi tms web core js callproc

Delphi多线程tthread详解

Delphi 显示提示信息xxx 是/否

Delphi 批量操作按钮组件属性

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



打赏

取消

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

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

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

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

评论

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