procedure TForm1.Button1Click(Sender: TObject);
var
DL,JH:boolean;
begin
DL := False;
JH := True;
while (DL = False) and (JH = True) do
begin
if (application.messagebox('登陆吗','询问',MB_YESNO+MB_ICONQuestion) = IDYES) then
begin
DL:=true; JH:=false;
end;
if (application.messagebox('激活吗','询问',MB_YESNO+MB_ICONQuestion) = IDYES) then
begin
DL:=false; JH:=true;
end;
end;
end;