Delphi Windows-FMX/VCL TrayIcon
此为Windows下 FMX 框架下的托盘工具
当然也可以在VCL使用
修改自 TTrayIcon 让其可以在FMX使用
blog: https://zelig.cn
Delphi 交流群: 73978363
在使用FMX开发Windows桌面应用的时候 需要给一个托盘功能
自带的只能在VCL下使用 所以就稍加修改使用了
创建使用
var TrayIcon: TWinTrayIcon; TrayIcon:= TWinTrayIcon.Create(Application.Title); TrayIcon.Icon:= LoadIcon(HInstance,'audi') ; TrayIcon.BalloonIcon:= TrayIcon.Icon; TrayIcon.BalloonFlags:=bfUser; TrayIcon.OnMouseUp:= procedure(Sender: TObject;mButton: TMouseButton; sState: TShiftState; P: TPoint) begin SetForegroundWindow(WindowHandleToPlatform(Handle).Wnd); PopupMenu1.Popup(p.X,p.Y) ; end; TrayIcon.Visible:= True;
托盘提示
TrayIcon.BalloonTitle:= '这是一个提示'; TrayIcon.BalloonHint:= '写出你想说的'; TrayIcon.ShowBalloonHint;
代码仓库Github: https://github.com/Icy2010/winTrayIcon
详细单元和Demo直接访问获取
还没有评论,来说两句吧...