程序在右下角有个图标,我想 把鼠标放在图标上的时候  滚动滚轮 向前滚 变量加1 向后滚 变量减一 
如何实现??实现就可以。不论方法
请看清楚红色的部分
在线等。对了立即给分
 

解决方案 »

  1.   

     private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
            {
                int temp = e.Delta;
            }
    根据temp判断
      

  2.   

    右下角的小图标不能响应滚轮事件。
      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. 
      

  3.   

            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);
            }
      

  4.   

    int count=0;
    //注册事件:
    this.右下角的图标控件.MouseWheel += new MouseEventHandler(右下角的图标控件_MouseWheel);private void 右下角的图标控件_MouseWheel(object sender, MouseEventArgs e)
    {
        count+=e.Delta /120;       
    }
      

  5.   

    C#提供的NotifyIcon控件没有MouseWheel事件,而且还是sealed,试试能不能用Shell_NotifyIcon了
      

  6.   

    NotifyIcon 没有MouseWheel事件