Solved

How to enable mousewill in VB.NET splitcontainer?

Posted on 2008-10-26
4
967 Views
Last Modified: 2012-08-13
Hello

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

Thanks

Eli
0
Comment
Question by:afikim
  • 2
4 Comments
 

Author Comment

by:afikim
ID: 22808597
Sorry for the typo = mousewill=mousewheel ;-)
0
 
LVL 8

Expert Comment

by:jorgesv13
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
0
 
LVL 85

Accepted Solution

by:
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

        PictureBox1.Parent.Focus()

    End Sub

Open in new window

0
 

Author Closing Comment

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

Eli
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now