if messagedlg('没有输入地址,是否要输入地址?';mtconfirmation;mbyes;0)=idok then

messagebox
等如何使用?
谢谢

解决方案 »

  1.   

    if messagebox(getactivewindow,'没有输入地址,....','信息提示',mb_ok+mb_iconinformation)=idok then
      

  2.   

    Delphi syntax:function MessageBox(const Text, Caption: PChar; Flags: Longint = MB_OK): Integer;C++ syntax:int __fastcall MessageBox(const char * Text, const char * Caption, int
     Flags = MB_OK);DescriptionUse MessageBox to display a generic dialog box a message and one or more buttons. Caption is the caption of the dialog box and is optional.MessageBox is an encapsulation of the Windows API MessageBox function. TApplication抯 encapsulation of MessageBox automatically supplies the missing window handle parameter needed for the Windows API function.The value of the Text parameter is the message, which can be longer than 255 characters if necessary. Long messages are automatically wrapped in the message box. The value of the Caption parameter is the caption that appears in the title bar of the dialog box. Captions can be longer than 255 characters, but don't wrap. A long caption results in a wide message box.The Flags parameter specifies what buttons appear on the message box and the behavior (possible return values). The following table lists the possible values. These values can be combined to obtain the desired effect.Value MeaningMB_ABORTRETRYIGNORE The message box contains three push buttons: Abort, Retry, and Ignore.
    MB_OK The message box contains one push button: OK. This is the default.
    MB_OKCANCEL The message box contains two push buttons: OK and Cancel.
    MB_RETRYCANCEL The message box contains two push buttons: Retry and Cancel.
    MB_YESNO The message box contains two push buttons: Yes and No.
    MB_YESNOCANCEL The message box contains three push buttons: Yes, No, and Cancel.MessageBox returns 0 if there isn抰 enough memory to create the message box. Otherwise it returns one of the following values:Value Numeric value MeaningIDOK 1 The user chose the OK button.
    IDCANCEL 2 The user chose the Cancel button.
    IDABORT 3 The user chose the Abort button.
    IDRETRY 4 The user chose the Retry button.
    IDIGNORE 5 The user chose the Ignore button.
    IDYES 6 The user chose the Yes button.
    IDNO 7 The user chose the No button.
      

  3.   

    if messagedlg('没有输入地址,是否要输入地址?';mtconfirmation;mbyes;0)=mrok then
    -----
      

  4.   

    如果你的英语可以的话messagedlg  messagebox可以看DELPHI自带的帮助
      

  5.   

    建議你熟悉一下Delphi 的開發環境,如何使用幫助。
      

  6.   

    带中文提示的if application.messagebox('没有输入地址,是否要输入地址?,'提示信息',mb_yesno)=idyes thenmessagebox比messagedlg好用,个人认为
      

  7.   

    messagebox( '显示内容',‘标题’,mb_yesno+MB_ICONWARNING)= idyes
    messagebox比messagedlg
      

  8.   

    if messagedlg('没有输入地址,是否要输入地址?';mtconfirmation;mbyes;0)=idok then
    改为:
     if messagedlg('没有输入地址,是否要输入地址?',mtconfirmation,[mbyes],0)=mryes then
       showmessage('我的对话框可以弹出了,并且我点的是yes按钮!');