如何在任务栏右下角添加一个图标,点击时会弹出一个菜单,单击内容时执行相应的操作,就同QQ那样的?
解决方案 »
- 請教:學習c#兩年,現在公司系統用的vb ,學習vb vb.net哪個好 謝謝
- 一个关于MouseMove事件的问题
- vb真的不能保存断点,书签等调试信息吗?
- 怎样取得数据库的所有表名
- 请绿豆来解决一下
- activebar控件的教程
- 请问绿色程序是如何制作的???
- 请问谁进行个多媒体播放,VOD点播,神龙卡的开发,能否留下通信方法,让大家交流交流
- 请问acptvb:OFFICE中的预览缩放不失真,比例非常一致.速度也很快.是怎样实现的呢?
- 请教高手如何模拟键盘Alt+PrintScreen
- 不知道哪位大侠会用fpspread表格控件的公式功能
- 做抓图程序时遇到的问题(SetCapture函数问题)??
如果是 6.0的 就用api,是shell_nitifyicondata这个api函数的。
NOTIFYICONDATA
typedef struct _NOTIFYICONDATA {
DWORD cbSize;
HWND hWnd;
UINT uID;
UINT uFlags;
UINT uCallbackMessage;
HICON hIcon;
char szTip[64];
} NOTIFYICONDATA, *PNOTIFYICONDATA;
Contains information that the system needs to process taskbar status area messages. cbSize
Size of this structure, in bytes.
hWnd
Handle to the window that will receive notification messages associated with an icon in the taskbar status area.
uID
Application-defined identifier of the taskbar icon.
uFlags
Array of flags that indicate which of the other members contain valid data. This member can be a combination of the following: NIF_ICON The hIcon member is valid.
NIF_MESSAGE The uCallbackMessage member is valid.
NIF_TIP The szTip member is valid. uCallbackMessage
Application-defined message identifier. The system uses this identifier for notification messages that it sends to the window identified in hWnd. These notifications are sent when a mouse event occurs in the bounding rectangle of the icon.
hIcon
Handle to the icon to add, modify, or delete.
szTip
Tooltip text to display for the icon.结构
Shell_NotifyIcon
WINSHELLAPI BOOL WINAPI Shell_NotifyIcon(
DWORD dwMessage,
PNOTIFYICONDATA pnid
); Sends a message to the system to add, modify, or delete an icon from the taskbar status area. Returns nonzero if successful, or zero otherwise.
dwMessage
Message value to send. This parameter can be one of these values: NIM_ADD Adds an icon to the status area.
NIM_DELETE Deletes an icon from the status area.
NIM_MODIFY Modifies an icon in the status area. pnid
Address of a NOTIFYICONDATA structure. The content of the structure depends on the value of dwMessage.
调用VB 和这个差不多