C
carem1
Unregistered / Unconfirmed
GUEST, unregistred user!
我的原意是当 ProgressBar1到达max的时候就判别 mys = s1 是否成立,如果成立就继续,不成立就弹出对话框,按确定后退出,但是现在成立那里没问题,如果不成立,他就会弹出无数次的错误对话框~!!请问怎么解决?
procedure Tcheck_frm.check;
var
mys: string;
begin
mys := ' 562213612498' + ' '
GetIdeDiskSerialNumber(S1, S2, S3, W3, W4, W5);
if mys = s1 then
begin
check_frm.Visible := false;
main_frm.Visible := true;
end
else
begin
if Application.MessageBox('硬件校验出错,警告信息已通知管理员',
'严重校验错误', mb_OK + MB_DEFBUTTON1 + MB_ICONwarning) = idok then
Application.Terminate;
end;
end;
procedure Tcheck_frm.Timer1Timer(Sender: TObject)
//校验界面过程
begin
if ProgressBar1.Position < ProgressBar1.Max then
begin
ProgressBar1.Position := ProgressBar1.Position + 1;
end
else
check;
end;
procedure Tcheck_frm.check;
var
mys: string;
begin
mys := ' 562213612498' + ' '
GetIdeDiskSerialNumber(S1, S2, S3, W3, W4, W5);
if mys = s1 then
begin
check_frm.Visible := false;
main_frm.Visible := true;
end
else
begin
if Application.MessageBox('硬件校验出错,警告信息已通知管理员',
'严重校验错误', mb_OK + MB_DEFBUTTON1 + MB_ICONwarning) = idok then
Application.Terminate;
end;
end;
procedure Tcheck_frm.Timer1Timer(Sender: TObject)
//校验界面过程
begin
if ProgressBar1.Position < ProgressBar1.Max then
begin
ProgressBar1.Position := ProgressBar1.Position + 1;
end
else
check;
end;