Results 1 to 35 of 35

Thread: [RESOLVED] scroll MDI Container with mouse wheel???

Threaded View

  1. #6

    Thread Starter
    Addicted Member adamm83's Avatar
    Join Date
    Oct 2005
    Location
    Toronto, ON, Canada
    Posts
    180

    Re: scroll MDI Container with mouse wheel???

    Quote Originally Posted by bushmobile
    I've decided to post this here (rather than the codebank thread) so more people will see it and possibly come up with a solution to another problem that gets generated.

    It seems that as long as the ActiveControl isn't one which already responds to the mousewheel (textbox/combobox/etc.) then the WM_MOUSEWHEEL is sent to the MDIForm and we just have to do some simple subclassing and then we can move the child form accordingly.

    However - the MDIForm scrollbar won't change it's position relative to the movement of the form - and I can't, for the life of me, get it to refresh without resorting to resizing the whole MDIForm which is obvious to the user.

    Edit: Just incase you weren't aware - this code (since it uses subclassing) will crash the IDE and you'll lose any unsaved work if you press the Stop button - unload the form correctly and you'll have no trouble & remember to save!
    Hey bushmobile,

    I just tested out your code and it works!!! The vertical scrollbar DOES refresh, but only when you move your mouse outside the mdi form. Also, one thing I noticed is it scrolls the child even if it's smaller than the parent. What I mean is, even if there is no vertical scrollbar, it still scrolls the child, which is not necessary.

    I will take a look at the code and see what I can do with it. I will also try out the FreeWheel and/or MS Intellipoint app that westconn1 suggested. I would honestly rather install a small mouse driver to fix the problem rather than add some code that may or may not cause other conflicts with my application.

    Again i will test both ways and see which works better. Although I am not sure if westconn1 understands what I was looking for. I don't need to be able to scroll in the vb IDE. There is actually a fix from microsoft to fix the vb6 IDE scroll wheel problem here, which also suggests to install Intellipoint v4.12. But I will try intellipoint and freewheel to see if it works with scrolling an mdi parent and child form.

    EDIT:
    hahaha I figured out a SUPER ghetto way of refreshing the scrollbar. Actually it's stupid and pointless, but maybe it will get you thinking...
    Add this where your comments is:
    VB Code:
    1. Me.Visible = False
    2. Me.Visible = True

    Maybe its just a matter of setting a property of the mdi form which whill initiate a refresh.
    Last edited by adamm83; Jul 6th, 2006 at 03:25 PM.
    adamm
    ACM Designs

    Codebank:
    RegOpen - Open registry keys in Regedit quick & easily


    "A man who tries to catch two rabbits at the same time will catch neither."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width