delphi 的小圖標的 生成.... 搜索把.关键字:系统栏 or 金山词 or tray or 时钟旁边 or 系统托盘 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我的源代码如下:const WM_REMIND_ICON_MESSAGE = WM_USER + 1; REMIND_TRAY_ICON = 1001;... procedure IconAction(var Message: TMessage); message WM_REMIND_ICON_MESSAGE;...procedure TReminderForm.IconAction(var Message: TMessage);var pos: TPoint;begin if Message.LParam = WM_LBUTTONDOWN then ShowTipForm() else if Message.Lparam = WM_RBUTTONUP then begin GetCursorPos(pos); pmIcon.Popup(pos.x, pos.y); end;end;其中ShowTipForm()显示一个窗口,pmIcon为一个PopupMenu。 然后:这个函数显示ICON:procedure TReminderForm.ChangeIcon(Action: Integer);var nid: NOTIFYICONDATA;begin nid.Wnd := ReminderForm.Handle; nid.hIcon := ReminderForm.Icon.Handle; nid.uFlags := NIF_MESSAGE + NIF_ICON + NIF_TIP; nid.uID := REMIND_TRAY_ICON; nid.szTip := 'ATFA Reminder'; nid.uCallbackMessage := WM_REMIND_ICON_MESSAGE; nid.cbSize := SizeOf(nid); if Action = 1 then Shell_NotifyIcon(NIM_ADD, @nid) else Shell_NotifyIcon(NIM_DELETE, @nid);end; IconAction函数捕捉ICON上的动作,如鼠标点击等等。而ChangeIcon改变状态栏的图表显示。如果还要具体,到Dephi的帮助中去查Shell_NotifyIcon吧。(Win 32 programmer guide) 忘了,还要uses Shellapi单元。 ksxy(空山新雨):不能運行呀...你能傳給我一個 簡單的源文件 嗎...謝謝你...email: [email protected] lichp(书生有驴情为径,绝海无鸭哭作粥!):可是我沒有trayIcon部件呀...你能幫我嗎.... 一群...... 在RxLib中就有﹐這個是最常用的, 我在自己的組件包中也做了一個 如何让在主程序上始终显示一条线? DELPHI ado丢失连接 我的DCOM组件明明注册了却在COM组件中找不到,但是用本地可以正常激活。 字符串表示的时间的相互比较问题。例如:2004-08-27 15:39:17 请问,CGI里面不可以用query来查询数据库吗? 来抢分啦! 求Socket编程资料!▲急▲ 100分求可以高速下载的windows2000的地址。。。 ADOConnection的连接问题? 请教高手,可有方法隐藏STRINGGRID中的指定行?设置行高的方法会把GRID线挡住,用数组又有点麻烦。 发票套打问题求助 那里有自定义报表插件?
WM_REMIND_ICON_MESSAGE = WM_USER + 1;
REMIND_TRAY_ICON = 1001;
.
.
. procedure IconAction(var Message: TMessage); message WM_REMIND_ICON_MESSAGE;
.
.
.
procedure TReminderForm.IconAction(var Message: TMessage);
var
pos: TPoint;
begin
if Message.LParam = WM_LBUTTONDOWN then
ShowTipForm()
else if Message.Lparam = WM_RBUTTONUP then
begin
GetCursorPos(pos);
pmIcon.Popup(pos.x, pos.y);
end;
end;其中ShowTipForm()显示一个窗口,pmIcon为一个PopupMenu。
var
nid: NOTIFYICONDATA;
begin
nid.Wnd := ReminderForm.Handle;
nid.hIcon := ReminderForm.Icon.Handle;
nid.uFlags := NIF_MESSAGE + NIF_ICON + NIF_TIP;
nid.uID := REMIND_TRAY_ICON;
nid.szTip := 'ATFA Reminder';
nid.uCallbackMessage := WM_REMIND_ICON_MESSAGE;
nid.cbSize := SizeOf(nid); if Action = 1 then
Shell_NotifyIcon(NIM_ADD, @nid)
else
Shell_NotifyIcon(NIM_DELETE, @nid);
end;
不能運行呀...
你能傳給我一個 簡單的源文件 嗎...
謝謝你...
email: [email protected]
可是我沒有trayIcon部件呀...
你能幫我嗎....