110,538
社区成员
发帖
与我相关
我的任务
分享
private const int WM_MOUSEWHEEL = 0x020A;
private int count1 = 0, count2 = 0;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_MOUSEWHEEL)
{
int iParam = (m.WParam.ToInt32()) >> 16;
if (iParam == 120)
{
count1++;
}
else if (iParam == -120)
{
count2++;
}
int xPos = m.LParam.ToInt32() & 0x0000FFFF;
int yPos = (m.LParam.ToInt32()) >> 16;
this.Text = string.Format("向前滚动{0}次,向后滚动{1}次,坐标x={2},y={3}", count1, count2,xPos,yPos);
}
base.WndProc(ref m);
}
BalloonTipClicked Occurs when the balloon tip is clicked.
BalloonTipClosed Occurs when the balloon tip is closed by the user.
BalloonTipShown Occurs when the balloon tip is displayed on the screen.
Click Occurs when the user clicks the icon in the notification area.
Disposed Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)
DoubleClick Occurs when the user double-clicks the icon in the notification area of the taskbar.
MouseClick Occurs when the user clicks a NotifyIcon with the mouse.
MouseDoubleClick Occurs when the user double-clicks the NotifyIcon with the mouse.
MouseDown Occurs when the user presses the mouse button while the pointer is over the icon in the notification area of the taskbar.
MouseMove Occurs when the user moves the mouse while the pointer is over the icon in the notification area of the taskbar.
MouseUp Occurs when the user releases the mouse button while the pointer is over the icon in the notification area of the taskbar.