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
Solved

How to enable mousewill in VB.NET splitcontainer?

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

791 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