Search code examples
c#visual-studio-2010mdimdiparent

Vertical Scroll Bar on MDI Parent Does Not Scroll Gradually


I have written an MDI application in C# under VS2010.

When I drag the thumb on the vertical scroll bar, the window does not move until the thumb is released.

Research has turned-up some things, but none of the information I have found so far has worked.

Does someone have some guidance on this issue? I want the window to scroll as I drag the thumb.

Chuck


Solution

  • "I want the window to scroll as I drag the thumb, the window does not move until the thumb is released"

    Set the Scroll Bar Property ScrollTrack = True

    Edit:

    Check the last example here: http://www.pcreview.co.uk/forums/determine-scrolling-mdi-form-mdiclient-t1323005.html its related to detecting scrolls to repaint child forms to avoid flickering

    And please have a look what Hans Passant does here: Issue Related to Scrollbar in MDI Form in C#

    psuedo code:

      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