在联系加密程序的时老报错麻烦各位帮忙看看
unit Unit1;interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
lbl1: TLabel;
edt1: TEdit;
btn1: TButton;
procedure edt1Change(Sender: TObject);
procedure btn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
const
Mima:string='123456789';
var
n:Integer=3;
{$R *.dfm}
procedure TForm1.edt1Change(Sender: TObject);
begin
SetWindowLong(edt1.Handle,GWL_STYLE ,GetWindowLong(edt1.Handle,GWL_STYLE )
or ES_RIGHT);
edt1.Invalidate;
end;
procedure TForm1.btn1Click(Sender: TObject);
begin
if(edt1.Text=Mima)then
MessageBox(edt1.Handle,'你输入的密码正确','登录成功',MB_OK)
else
begin
end; begin
n:=n-1;
if(n<1) then
MessageBox(Height,'你输入的错误太多程序将关闭','关闭',MB_OK);
Close;
else
begin
lbl1.Caption:='请输入密码你还有'+ IntToStr(n)+'次输入';
end;
end;
end
end
这是调试的时候报错的提示 @小甲鱼 黑龍 发表于 2016-2-22 10:01
@小甲鱼
我晕这个板块会的人很少吗? if (edt1.Text = Mima) then
MessageBox(edt1.Handle, '你输入的密码正确', '登录成功', MB_OK)
else
begin
end;
begin
n := n - 1;
if (n < 1) then
begin
MessageBox(Height, '你输入的错误太多程序将关闭', '关闭', MB_OK);
Close;
end
else
begin
lbl1.Caption := '请输入密码你还有' + IntToStr(n) + '次输入';
end;
end;
页:
[1]