• Delphi里面弹出对话框的方法


    1.procedure   ShowMessage(const   Msg:   string);

        单元:Dialogsor   QDialogs

        例子:showmessage( 'hello ');

    2.function   MessageBox(const   Text,   Caption:   PChar;   Flags:   Longint   =   MB_OK):   Integer;

        单元:Forms

        例子:MessageBox( 'This   should   be   on   top. ',   'Look ',   mb_OK)

        注:delphi的帮助文档提供的例子好像有误他的最后一个参数是[sbmok]

    3.function   MessageDlg(const   Msg:   string;   DlgType:   TMsgDlgType;   Buttons:   TMsgDlgButtons;   HelpCtx:   Longint):   Word;

        单元:Dialogsor   QDialogs

        例子:if   messagedlg( '确定要退出吗? ',mtwarnint,[mbyes,mbno],0)=mryes   then   close;

    4.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

          );

        单元:windows   API

        例子:windows.messagebox(0, '标题 ', '警告错误 ',MB_ICONSTOP);

  • 相关阅读:
    汇编-实验9
    Starling开源手势库AcheGesture
    Robotlegs2的Starling扩展
    Flash Builder 4.6/4.7 注释以及字体大小修改
    js中函数的理解
    js对象引用赋值后
    var声明提前 undefined
    光棍节程序员闯关秀
    body和普通div背景图宽高百分比的区别
    笔试题
  • 原文地址:https://www.cnblogs.com/blogpro/p/11426570.html
Copyright © 2020-2023  润新知