예제 #1
0
        protected virtual void OnHScroll(ScrollEventArgs e)
        {
            //	repaint the moved tabs
            Invalidate();

            //	Raise the event
            HScroll?.Invoke(this, e);

            if (e.Type == ScrollEventType.EndScroll)
            {
                _oldValue = e.NewValue;
            }
        }
예제 #2
0
 protected override void WndProc(ref Message m)
 {
     if (m.Msg == WM_HSCROLL)
     {
         HScroll?.Invoke(this, new EventArgs());
     }
     //else if (m.Msg == WM_VSCROLL)
     //{
     //    VScroll?.Invoke(this, new EventArgs());
     //}
     // 同 20 一样的还有:15 4140 49892
     else if (m.Msg == 15) // 鼠标滚动,上下键 控制屏幕滚动
     {
         VScroll?.Invoke(this, new EventArgs());
     }
     base.WndProc(ref m);
 }