不用ShowMessage
改用
MessageBox
MessageDlg

解决方案 »

  1.   

    同上,或者自己制作对话框,用showmodal打开
      

  2.   

    if edit1:='' then
      begin
        if Application.MessageBox('','no',MB_OKCANCEL + MB_DEFBUTTON1) <> IDOK then
          exit;
      end;
      

  3.   

    这两种办法都可以,试试看:
    方法一:
    if edit1:='' then
      begin
        if Application.MessageBox('Exit?','no',MB_OKCANCEL + MB_DEFBUTTON1) <> IDOK then
          exit;
      end;方法二:
    if edit1:='' then
      begin
        if MessageDlg('Exit?',mtConfirmation, [mbYes, mbNo], 0) = mrYes then
          exit;
      end;