How to enable mousewill in VB.NET splitcontainer?

Posted on 2008-10-26
Last Modified: 2012-08-13

I have a SplitContainer which in one of it's panels I embeded a picturebox.
When the panel is smaller than the image, I can see the scrolls.  BUT, when I scroll the mouse wheel, nothing happens.

Any idea


Question by:afikim
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Author Comment

ID: 22808597
Sorry for the typo = mousewill=mousewheel ;-)

Expert Comment

ID: 22810124
I had the same problem some time ago, and must tell you, there's no easy way to accomplish it.

What I did is to handle the "MouseWheel" event of my form, and then scroll programatically set the scrolling of the panel based on the delta property of the event
LVL 86

Accepted Solution

Mike Tomlinson earned 125 total points
ID: 22810128
When the mouse enters the PictureBox, give Focus to the parent container instead.  Then the mouse wheel will scroll the SplitContainer instead:

    Private Sub PictureBox1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseEnter
    End Sub

Open in new window


Author Closing Comment

ID: 31510144
Thanks Idle_Mind
Great and easy solution - both to understand and to implement.


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question