在Formcreate中执行application.Terminate,为什么程序没有退出?
procedure TForm1.FormCreate(Sender: TObject);
var
postList: TStrings;
Response: TStringStream;
str:string;
begin
Response := TStringStream.Create('');
postList := TStringList.Create;
try
postList.Add('username=system');
postList.Add('password=password');
IdHTTP1.Post(homepage+'/login.jsp', postList,Response);
except
if inputquery('' ,'网站没有开通。要输入新的网址吗?',str) then
begin
edit2.text:=str;
Button1Click(nil);
end
else
application.Terminate;
end;
Response.Free;
postList.Free;
end;
在出现提问时,我按下取消按钮,程序应该执行application.Terminate语句,但是在进程列表里却发现程序依然存在,这是怎么回事?(我用了一个系统托盘控件,并且在开始设置其visible=false,但是应该不影响别的吧?还是IdHTTP控件有影响?)