여기 제가 끝난 것입니다.
는 낮은 경계를 얻을 수있는 컨트롤의 높이를 계산 제어
의 위치를 얻기 DragLeave 이벤트
의 이벤트를 생성합니다.
마우스 위치를 확인하고, 상기 경계에 있으면, .. 상수의 값이 다른 도움
private void thumbFlow_DragLeave(object sender, EventArgs e)
{
int BegY_ThumbFlow = this.thumbFlow.FindForm().PointToClient(this.thumbFlow.Parent.PointToScreen(this.thumbFlow.Location)).Y;
int thumbFlowBound_Y = this.thumbFlow.Height + BegY_ThumbFlow;
int mouseY = this.thumbFlow.FindForm().PointToClient(MousePosition).Y;
while (mouseY >= thumbFlowBound_Y)
{
thumbFlow.VerticalScroll.Value = thumbFlow.VerticalScroll.Value + DRAG_DROP_SCROLL_AMT;
mouseY = thumbFlow.FindForm().PointToClient(MousePosition).Y;
thumbFlow.Refresh();
}
while (mouseY <= BegY_ThumbFlow)
{
thumbFlow.VerticalScroll.Value = thumbFlow.VerticalScroll.Value - DRAG_DROP_SCROLL_AMT;
mouseY = thumbFlow.FindForm().PointToClient(MousePosition).Y;
thumbFlow.Refresh();
}
}
희망 수직 스크롤 (또는 수평 스크롤)을 변경.
다른 방법은 다음과 같습니다. http://stackoverflow.com/a/231486/17034 –