MessageDlgPos('退出吗',mtconfimation,mbYesNoCancel,0,200,200,mbYes);提示出错信息:too many parameters.
这条语句是帮助里的例句,为什么出错.

解决方案 »

  1.   


    function MessageDlgPos(const Msg: string; DlgType: TMsgDlgType;
      Buttons: TMsgDlgButtons; HelpCtx: Longint; X, Y: Integer): Integer;
    begin
      Result := MessageDlgPosHelp(Msg, DlgType, Buttons, HelpCtx, X, Y, '');
    end;
      

  2.   

    mtconfimation---->mtConfirmation而且出错不在这句。找别的地方吧
      

  3.   

    帮助里:
    This example uses a button on a form. When the user clicks the button, a message box appears with a Yes, No, and Cancel button on it:procedure TForm1.Button1Click(Sender: TObject);begin
      MessageDlgPos('Are you there?',mtConfirmation, mbYesNoCancel, 0, 200, 200, mbYes);
    end;
    我就按照这个来的.
      

  4.   

    我不是说了嘛,这句没问题,找其他地方,就是说,出错的地方和这句无关。你出错的地方编译器已经告诉你了:too many parameters. ---> 太多参数了
      

  5.   

    delphi 6的HELP中的Example是这样的
         MessageDlgPos('Are you there?',mtConfirmation, mbYesNoCancel, 0, 200, 200);
    你的多个最后一个mbYes,正确的:
       MessageDlgPos('退出吗',(mtInformation),mbYesNoCancel,0,200,200);