CnPack Forum


 
Subject: 为什么在D2009用TCnTrayIcon的BalloonHint不出气泡提示?[已解决]
lzj1981
新警察
Rank: 1



UID 41114
Digest Posts 0
Credits 6
Posts 2
点点分 6
Reading Access 10
Registered 2008-10-17
Status Offline
Post at 2008-11-15 16:09  Profile | Blog | P.M. 
为什么在D2009用TCnTrayIcon的BalloonHint不出气泡提示?[已解决]

为什么在Delphi2009中用TCnTrayIcon的BalloonHint不出气泡提示?
代码是:
unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, CnButtons, CnClasses, CnTrayIcon;
type
  TForm1 = class(TForm)
    CnTrayIcon1: TCnTrayIcon;
    CnBitBtn1: TCnBitBtn;
    procedure CnBitBtn1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
  CnTrayIcon1.UseAppIcon :=True;
end;
procedure TForm1.CnBitBtn1Click(Sender: TObject);
begin
  CnTrayIcon1.BalloonHint('提示','内容',btError,3);
end;
end.

刚刚看到发错区域了,但是不会删,请版主不要介意

[ 本帖最后由 lzj1981 于 2008-11-16 22:45 编辑 ]
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2008-11-15 21:24  Profile | Blog | P.M. 
我移动到组件区吧。
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2008-11-15 23:20  Profile | Blog | P.M. 
原因找到了。D2009中调用的WINDOWS api默认由A系列改成了W系列,而此组件中的ShellNotify_Icon的参数还是原来的结构,导致调用失败。

现已修正,楼主可在我们的CVS上获取最新代码。参考此贴:
http://bbs.cnpack.org/viewthread.php?tid=1882&extra=page%3D1
Top
lzj1981
新警察
Rank: 1



UID 41114
Digest Posts 0
Credits 6
Posts 2
点点分 6
Reading Access 10
Registered 2008-10-17
Status Offline
Post at 2008-11-16 22:45  Profile | Blog | P.M. 
已经试过新版,问题已修正
Top
 




All times are GMT++8, the time now is 2024-11-22 18:54

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.009978 second(s), 9 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP