• Delphi 消息窗口 Application.messagebox


    1、命名空间:Vcl.Forms

    2、Application.MessageBox()中的参数:

          如:Application.MessageBox('当前查找结果为空,请确认XXXXX!','提示:',mb_ok)
                    第一个和第二个都是:PWideChar
                            使用时用到String类型的message_info时可以这样转换:PWideChar(WideString(str_Message))
                        message_info := '当前查找结果为空,请确认XXXXX!';
                            message_type:= '提示:';                       
                            Application.MessageBox(PWideChar(WideString(message_info)),PWideChar(WideString(message_type)),mb_ok)
                    第三个参数是窗体上的按键类型:     
                            mb_ok:只有确定键
                            MB_OKCANCEL : 确定和取消键

    3、Application.messagebox():返回值。

         点击确定:返回值为1(Integer);
             如:
             if(Application.messagebox('确定删除?', '提示:', MB_OKCANCEL) <> 1)
             begin
     
             end;
  • 相关阅读:
    hdu 5101 Select
    hdu 5100 Chessboard
    cf B. I.O.U.
    cf C. Inna and Dima
    cf B. Inna and Nine
    cf C. Counting Kangaroos is Fun
    Radar Installation 贪心
    spfa模板
    Sequence
    棋盘问题
  • 原文地址:https://www.cnblogs.com/jijm123/p/12624170.html
Copyright © 2020-2023  润新知