1

Can any body tell me how to handle events for System tray in windows.

I mean, when some body clicks on the system tray icon then I want to check whether to enable the application or not. Is there any way to capture events corresponding to system tray click.

4

2 に答える 2

3

In a .NET Forms Application the System Tray control { NotifyIcon } provides following Events to check what you want to achieve:

  • Click
  • DoubleClick
  • MouseClick
  • MouseDoubleClick

You can put the logic into these event handlers.

I hope this one helps out!

于 2009-10-09T07:39:39.593 に答える
1

NotifyIconに関するCodeProjectNotifyIconに関する
MSDN

NotifyIconクラスのイベント:

ユーザーがステータス領域のアイコンをクリック すると発生します。
DoubleClick ユーザーがタスクバーのステータス通知領域にあるアイコンをダブルクリックすると発生します。
MouseDown ポインターがタスクバーのステータス通知領域のアイコンの上にあるときに、ユーザーがマウスボタンを押すと発生します。
MouseMove ポインターがタスクバーのステータス通知領域のアイコン上にあるときに、ユーザーがマウスを移動したときに発生します。
MouseUp ポインターがタスクバーのステータス通知領域のアイコンの上にあるときに、ユーザーがマウスボタンを離したときに発生します。

于 2009-10-09T08:59:50.727 に答える