我在 VS2010 下用 C# 编写了一个 MDI 应用程序。
当我在垂直滚动条上拖动拇指时,在释放拇指之前窗口不会移动。
研究发现了一些东西,但到目前为止我发现的所有信息都没有用。
有人对这个问题有一些指导吗?我希望窗口在我拖动拇指时滚动。
查克
最佳答案
"I want the window to scroll as I drag the thumb, the window does not move until the thumb is released"
设置滚动条属性ScrollTrack = True
编辑:
在此处检查最后一个示例: http://www.pcreview.co.uk/forums/determine-scrolling-mdi-form-mdiclient-t1323005.html 它与detecting scrolls to repaint child forms to avoid flickering有关
请看看 Hans Passant 在这里做了什么:Issue Related to Scrollbar in MDI Form in C#
伪代码:
protected override void WndProc(ref Message m)
{
try
{
switch (m.Msg)
{
//Scolling progress and Completion will be triggered
case WM_HSCROLL:
case WM_VSCROLL:
//this doesn't work
//this.VerticalScroll.Value = x;
//I haven't tested this but it should definately work:
//http://www.pinvoke.net/default.aspx/user32.setscrollpos
关于c# - MDI 父项上的垂直滚动条不会逐渐滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12698520/