procedure TForm1.FormCreate(Sender: TObject);
begin
if Screen.Width <> 800 then
   if Application.MessageBox('为了本软件界面的美观性,强烈建议在【1024×768】的分辨率下运行,'+ #10 + '请先将分辨率切换到【1024×768】再运行本软件?', '提示消息',mb_OK)=idok then
           Form1.Close;//为什么关不了程序~~
   else
    ....为什么关不了程序~~

解决方案 »

  1.   

    在Create中是不能关闭程序的,可以用Application.Terminate
      

  2.   

    if .... then
    begin
      BClose := True;
      Exit;
    end;在OnShow里:
    if BClose then 
    begin
      Close;
      Exit;
    end;如果Onclose里没有什么要处理的,直接用Application.Terminate
      

  3.   

    procedure TForm1.FormCreate(Sender: TObject);
    begin
     if Screen.Width <> 800 then
       if Application.MessageBox('为了本软件界面的美观性,强烈建议在【1024×768】的分辨率下运行,'+ #10 + '请先将分辨率切换到【1024×768】再运行本软件?', '提示消息',MB_OKCANCEL)=idok then
        application.Terminate
       else
       showmessage('正常运行');end;