Disable mouse wheel

Topics: Algorithms, Español, General Topics, WinForms Controls
Mar 22, 2011 at 1:02 PM
Edited Mar 22, 2011 at 1:02 PM

Hi

Someone can explain me how can I disable the mouse wheel? Because when I roll the mouse wheel, the map disappears from the picturebox, and the image turns black.

I did the following:

 

protected override void WndProc(ref Message m)
{
if (m.Msg == 522) // WM_MOUSEWHEEL
{
ReasignarMapa(); // Reload the map
return;
}
base.WndProc(ref m);
}

 

But the problem now, if I roll the mouse wheel the image turns black during 4 o 5 seconds, after that, the map come back. What can I do? Should I disable the mouse wheel?

P.D: I use other buttons to do zooms.

Thanks!

Coordinator
Mar 22, 2011 at 2:58 PM

Did you create your own control for displaying sharpMap maps?

Why don't you use MapBox or MapImage from the SharpMap.UI project?

Hth FObermaier

Mar 22, 2011 at 3:05 PM
Edited Mar 22, 2011 at 3:08 PM

 

Sorry, I used MapImage not PictureBox.

Any Idea?

Coordinator
Mar 22, 2011 at 4:22 PM

your other zoom operations go faster?

Mar 23, 2011 at 9:13 AM

No, my zoom operations take 4 or 5 seconds also. I will continue investigating... Thanks again.