如何根据条件运算结果动态的修改trayicon的图标显示?

bearbaba 2006-07-16 10:59:50
实在没有思路,不知道怎么做,希望能有可用代码,谢谢!
...全文
97 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
我不懂电脑 2006-07-17
  • 打赏
  • 举报
回复
F:\Program Files\Borland\CBuilder6\Examples\Apps\TrayIcon
BlueDeepOcean 2006-07-17
  • 打赏
  • 举报
回复
其中count可看成你所要得计算结果。
BlueDeepOcean 2006-07-17
  • 打赏
  • 举报
回复
下面这个例子模拟了根据按钮点击次数的增加而依次显示TrayIcon的图标:

//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "Trayicon"
#pragma resource "*.dfm"
TForm1 *Form1;

int count;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
count = 0;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
if (count < ImageList1->Count)
TrayIcon1->IconIndex = count;
else
count = 0;
count ++;
}
//---------------------------------------------------------------------------

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧