首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

帮忙看下这段程序,多谢拉~

2012-02-19 
帮忙看下这段程序,谢谢拉~~~unitdlginterfaceusesWindows,Messages,SysUtils,Variants,Classes,Graphics,

帮忙看下这段程序,谢谢拉~~~
unit   dlg;

interface

uses
    Windows,   Messages,   SysUtils,   Variants,   Classes,   Graphics,   Controls,   Forms,
    Dialogs,   StdCtrls;

type
    TForm1   =   class(TForm)
        Button1:   TButton;
        procedure   Button1Click(Sender:   TObject);
    private
        {   Private   declarations   }
    public
        {   Public   declarations   }
    end;

var
    Form1:   TForm1;

implementation

{$R   *.dfm}

procedure   TForm1.Button1Click(Sender:   TObject);
begin
  if   MessageDlg( '想睡了吗? ',mtConfirmation,[mbYes,mbNo],0)=mbYes   then
      begin
        ShowMessage( '甭玩了! ');
        Close;
        end
        else
        ShowMessage( '快攻关吧! ');
end;

end.


其中     if   MessageDlg( '想睡了吗? ',mtConfirmation,[mbYes,mbNo],0)=mbYes   then
总提示有不协调的类型,为什么呀?

[解决办法]
不应该是MBYES 应该是MRyes

热点排行