zoukankan      html  css  js  c++  java
  • delphi实现起泡提示效果

    unit Unit1;

    interface

    uses
      Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
      Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;

    const
      ECM_FIRST               = $1500;
      EM_SHOWBALLOONTIP   = ECM_FIRST + 3;
      EM_HIDEBALLOONTIP   = ECM_FIRST + 4;
    type
      _tagEDITBALLOONTIP = packed record
        cbStruct: DWORD;
        pszTitle,
        pszText : PWideChar;
        ttiIcon : integer;
      end;
      TEditBalloonTip = _tagEDITBALLOONTIP;

    type
      TForm1 = class(TForm)
        edit1: TEdit;
        button1: TButton;
        Memo1: TMemo;
        procedure button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form1: TForm1;

    implementation

    {$R *.dfm}

    procedure TForm1.button1Click(Sender: TObject);
    var
      ebt: TEditBalloonTip;
    begin
      with ebt do
      begin
        cbStruct := SizeOf(ebt);
        pszTitle := '提示';
        pszText := '请输入内容';
        ttiIcon := 3;         {NONE:0;INFO:1;WARNING:2;ERROR:3   不同状态}
      end;
      SendMessage(memo1.Handle,EM_SHOWBALLOONTIP,0,Longint(@ebt));
    end;

    end.

  • 相关阅读:
    Servlet设置Cookie无效
    IOS即时通讯XMPP搭建openfire服务器
    IOS之富文本编辑
    unittest单元测试框架总结
    杀死future处理的阻塞线程
    APP的UI设计原则
    如何降低一个程序的耦合性
    Hyperopt中文文档导读
    Hyperopt中文文档导读
    AdaBoost算法特性
  • 原文地址:https://www.cnblogs.com/zyb2016/p/13330053.html
Copyright © 2011-2022 走看看