begin
....if MessageDlg('确认否?',mtInformation,[mbYes,mbNo],0) = mrYes then....
end;var InputStr:string;
begin
……InputStr:=InPutBox('Input Box','Hello','Go Go Go');……
end;

解决方案 »

  1.   

    就是楼上那样啦,InputBox有返回字符串.
    不懂看帮助吧,应该有example的.
      

  2.   

    function MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint): Word;dlgtype
    mtWarning A message box containing a yellow exclamation point symbol.
    mtError A message box containing a red stop sign.
    mtInformation A message box containing a blue "i".
    mtConfirmation A message box containing a green question .
    mtCustom A message box containing no bitmap. The caption of the message box is the name of the application's executable file.msgdlgbuttonsmbYes A button with 'Yes' on its face.
    mbNo A button the text 'No' on its face.
    mbOK A button the text 'OK' on its face.
    mbCancel A button with the text 'Cancel' on its face.
    mbAbort A button with the text 'Abort' on its face
    mbRetry A button with the text 'Retry' on its face
    mbIgnore A button the text 'Ignore' on its face
    mbAll A button with the text 'All' on its facembNoToAll A button with the text 'No to All' on its face
    mbYesToAll A button with the text 'Yes to All' on its face
    mbHelp A button with the text 'Help' on its face
      

  3.   

    MessageDlg是DELPHI的专用函数,不能定义标题,返回直是 Word ;MessageBox是API函数,可以定义标题文字,返回植是 Int ;两者效果基本还是一样,就看你当时的需要(^_^)!个人感觉好象MessageBox编出的程序大小要小一点(^_^)!InPutBox也可以定义标题文字,返回植是 String;就这些了,呵呵(^_^)!
      

  4.   

    function InputBox(const ACaption, APrompt, ADefault: string): string;
      

  5.   

    inputbox 跳出的对话框可以输入文字其实这几个函数联机帮助里都有Example的
      

  6.   

    InputBox('Input Box', 'Prompt', 'Default string');
    MessageDlg('Exiting the Object Pascal application.', mtInformation,
          [mbOk], 0);
    主要是inputbox是进行输入的,它一般都要接收一些数据进去;
    而messagedlg是提醒人家出现什么问题,然后应该怎么做。
      

  7.   

    MESSAGEDLG是要返回一个集合信息的一个值,可以通过这个值进行下一次你要做什么,其实不如用
    Application.MessageBox()全中文的;
    If application.MessageBox('你的提示信息','提示',mb_okcancel+mb_)=MrOk then
    begin
    end 
    而INPUTBOX则是要返回一个字符串,(只要你执行了)