6
6tc1
Hi all, I've got a UserControl that contains a few PictureBox objects.
If I click on outside of the Picture in the UserControl, the scrolling
with the mouse button works - however, no amount of clicking on the
PictureBox objects will get that scrolling working. However, after I
click on outside of the PictureBox object, then click as many times as
I like on the PictureBox the scrolling with the mouse wheel continues
to work.
I found this:
http://www.experts-exchange.com/Pro...ages/Visual_Basic/VB_Controls/Q_20658733.html
extend the PictureBox class and use the following to catch mouse wheel
roll events?
this.MouseDown += new
System.WinForms.MouseEventHandler(this.pictureBoxMouseDown);
private void pictureBoxMouseDown(object sender,
System.WinForms.MouseEventArgs e) {
//some code to catch whether the mouse wheel is rolling
}
This strikes me as a little convoluted - is there an easier way?
Thanks,
Novice
If I click on outside of the Picture in the UserControl, the scrolling
with the mouse button works - however, no amount of clicking on the
PictureBox objects will get that scrolling working. However, after I
click on outside of the PictureBox object, then click as many times as
I like on the PictureBox the scrolling with the mouse wheel continues
to work.
I found this:
http://www.experts-exchange.com/Pro...ages/Visual_Basic/VB_Controls/Q_20658733.html
objects to Image objects. However, is there another way? I.E. couldFrom what I can determine the answer is to change the PictureBox
extend the PictureBox class and use the following to catch mouse wheel
roll events?
this.MouseDown += new
System.WinForms.MouseEventHandler(this.pictureBoxMouseDown);
private void pictureBoxMouseDown(object sender,
System.WinForms.MouseEventArgs e) {
//some code to catch whether the mouse wheel is rolling
}
This strikes me as a little convoluted - is there an easier way?
Thanks,
Novice