Click to See Complete Forum and Search --> : Scrolling over usercontrol or form


gborges
February 26th, 2009, 08:24 AM
Hi all!

In my app, both, the usercontrol and the form can be scrolled.

I would like to add a function which the scrolling act is captured by the usercontrol if the mouse is over the usercontrol or by the form if the mouse is not over the usercontrol.

Now, in my app, the scrolling action is captured by the form and by the usercontrol, but all the time even if the mouse is over the usercontrol, only the form gets this action (scrolling).

How should I code in order to have this scrolling behavior in my app?

Thank you in advance!
Gustavo

JonnyPoet
February 27th, 2009, 10:44 AM
Whats about simple using the mousemove delegate of the form and checking if the mouse is just over the usercontrol and in that case simple turning of the scroll mechanism of the form. Havn't tested but IMHO that could work. Simple give it a try