messagebox怎么用啊

解决方案 »

  1.   

    if Application.MessageBox('确定要删除选择的条目吗?', '删除确认', MB_YESNO or MB_ICONINFORMATION)=IDYES then
    begin
    //选择了Yes,操作........
    end
    else
    begin
    //选择NO,操作........
    end;
      

  2.   

    if Application.MessageBox('确定要删除吗?', '系统信息', MB_YESNO)=IDYES then
    begin
    //选择了Yes,操作........
    end
    else
    begin
    //选择NO,操作........
    end;
      

  3.   

    Application.MessageBox('数据库连接失败,请与管理员联系','提示',MB_OK+MB_ICONSTOP);
      

  4.   

    Application.MessageBox(pchar('确定要删除选择的条目吗?'),pchar( '删除确认'), MB_YESNO or MB_ICONINFORMATION)//如果信息为字符串变量
      

  5.   

    代句柄的可以这样:
       int MessageBox(
          HWND hWnd,    // handle of owner window
          LPCTSTR lpText,   // address of text in message box
          LPCTSTR lpCaption,   // address of title of message box  
          UINT uType     // style of message box
       );  如 MessageBox(Handle,'标题','显示的消息',MB_YESNOCANCEL); 等等.
      

  6.   

    还有
    application.MessageBox('HELLO', 'HELLO', MB_OK);
      

  7.   

    messagebox(self.Handle,'请先新建文件夹!','提示信息',MB_ok+mb_iconinformation);
      

  8.   

    呵呵,MessageBox(Handle,'标题','显示的消息',MB_YESCANCEL);