Solved

How to enable mousewill in VB.NET splitcontainer?

Posted on 2008-10-26
4
966 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

708 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

16 Experts available now in Live!

Get 1:1 Help Now