c#中怎样让滚动条清空
1个回答
展开全部
VScrollBar的Scroll事件处理函数 private void vScrollBar1_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e) ScrollEventArgs.ThumbTrack处理滚动条正在被移动的消息。 如何区分是在向上滚动还是向下滚动?? 在c#中控制滚动条 // First import the SendMessage function from user32.dll: [DllImport("user32.dll", EntryPoint = "SendMessageA")] internal static extern int SendMessage(int hwnd, int wMsg, int wParam, int lParam); // Then add this constants to your codes private const int WM_VSCROLL = 0x115; private const int WM_HSCROLL = 0x114; private const int SB_LINEDOWN = 1; private const int SB_LINEUP = 0; private const int SB_TOP = 6; private const int SB_BOTTOM = 7; private const int SB_PAGEUP = 2; private const int SB_PAGEDOWN = 3; then: SendMessage(rbox.Handle.ToInt32(), WM_VSCROLL, SB_LINEUP, 0);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询