从MenuStrip Control单击选项(托盘通知图标)

时间:2013-01-18 08:46:51

标签: c# vb.net winforms system-tray trayicon

我想做类似的事情:

http://i.stack.imgur.com/CVKCq.png

此代码打开托盘通知图标窗口:

Dim Shell_TrayWnd As IntPtr = FindWindow("Shell_TrayWnd", "")
Dim TrayNotifyWnd As IntPtr = FindWindowEx(Shell_TrayWnd, 0, "TrayNotifyWnd", "")
Dim TrayNotifyButtonWnd As IntPtr = FindWindowEx(TrayNotifyWnd, 0, "Button", "")

Dim BM_CLICK As Integer = &HF5
SendMessage(TrayNotifyButtonWnd, BM_CLICK, 0, 0)

现在我想做点什么:

RightMouseClick(SkypetrayIcon)
ClickOnOption(SkypetrayIconMenuHandle,0)

我该怎么办? 也许有另一种方法(更简单的方法)

0 个答案:

没有答案