c# - MDI 父项上的垂直滚动条不会逐渐滚动

标签 c# visual-studio-2010 mdi mdiparent

我在 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/

相关文章:

visual-c++ - 如何让 MDI MFC 应用程序在任务栏中显示一个实例?

c# - Unity 2D - Sprite 在跟随物体时闪烁

c++ - openCV imshow不在屏幕上渲染图像

c++ - Qt创建MDI文档窗口

c++ - VS10 在执行 C++ 项目的 “Build” 或 “Rebuild” 时崩溃

c++ - 如何在 Visual Studio 2010 中使用 GStreamer?

c# - 在 MDI 子窗体之间切换

c# - 为什么我预期的空对象不为空?

c# - 如何在C#中验证图像文件格式

c# - 如何使用 .net 制作 Facebook 应用程序