Application.MessageBox('测试','对话框',MB_OK+MB_IconInformation);MB_IconInformation
MB_IconQuestion
MB_IconError

解决方案 »

  1.   

    Application.MessageBox('Text' ,'Caption' ,MB_ICONINFORMATION)//!
    Application.MessageBox('Text' ,'Caption' ,MB_ICONQUESTION)// ?
    Application.MessageBox('Text' ,'Caption' ,MB_ICONERROR) //x
      

  2.   

    查一下sdk帮助,查找messagebox的参数,你会发现有N多中的用法。
    当然,需调用上面的函数。
      

  3.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      MessageBox(Handle, '这是一个警告', '警告', MB_ICONWARNING);
    end;
      

  4.   

    To display an icon in the message box, specify one of the following values. Value Meaning 
    MB_ICONEXCLAMATION, 
    MB_ICONWARNING An exclamation-point icon appears in the message box. 
    MB_ICONINFORMATION, MB_ICONASTERISK An icon consisting of a lowercase letter i in a circle appears in the message box. 
    MB_ICONQUESTION A question- icon appears in the message box. 
    MB_ICONSTOP, 
    MB_ICONERROR, 
    MB_ICONHAND A stop-sign icon appears in the message box. 
      

  5.   

    function MessageDlg(Const Msg:String;AType:TMsgDlgType;AButtons:TMsgDlgButtons;HelpCtx:Longint):Word;
    Msg参数:显示内容、
    AType参数:决定消息框的类型,有mtInformation,mtError,mtWarning,mtConfirmaton.
    AButton参数:mbYes,mbNo,mbOK,mbCancel
    HelpCtx参数:帮助文件
      

  6.   

    最后一个参数可为:三个常量相加的结果,这三个常量分别代表:
    1.按钮
    2.图标
    3.默认按钮:
    如:
    Application.MessageBox('确认','你确认要册删除吗?',MB_YESNO+MB_ICONQUESTION+MB_DEFBUTTON2); 第一个数可取
      MB_OK = $00000000;
      MB_OKCANCEL = $00000001;
      MB_ABORTRETRYIGNORE = $00000002;
      MB_YESNOCANCEL = $00000003;
      MB_YESNO = $00000004;
      MB_RETRYCANCEL = $00000005;
    第二个数可取
      MB_ICONHAND = $00000010;
      MB_ICONQUESTION = $00000020;
      MB_ICONEXCLAMATION = $00000030;
      MB_ICONASTERISK = $00000040;
      MB_USERICON = $00000080;
      MB_ICONWARNING                 = MB_ICONEXCLAMATION;
      MB_ICONERROR                   = MB_ICONHAND;
      MB_ICONINFORMATION             = MB_ICONASTERISK;
      MB_ICONSTOP                    = MB_ICONHAND;第三个数可取
      MB_DEFBUTTON1 = $00000000;
      MB_DEFBUTTON2 = $00000100;
      MB_DEFBUTTON3 = $00000200;
      MB_DEFBUTTON4 = $00000300;
      

  7.   

    用application.messagebox()具体用法查查在线帮助,如果闲那些字符常量写着累,可以用他们的整数值代替
      

  8.   

    MessageDlg('!', mtInformation,[mbOk], 0);mtInformation可以选用mtWarning,mtError,mtConfirmation
      

  9.   

    MB_ICONWARNING 
    MB_ICONINFORMATION
    MB_ICONQUESTION 
    MB_ICONERROR
      

  10.   

    MessageDlg的按钮文字是英文的
    Application.MessageBox的按钮文字是中文的
      

  11.   

    MessageBox(Handle,'Text','Caption',MB_ok or MB_IconInformation/MB_Iconquestion/MB_IconError);