5
Answers

Zoom option in Mouse Scroll

Photo of Farooque Ali

Farooque Ali

13y
2.9k
1
Hi,

am doing the application using Image Processing techniques.In that Zoom option also included, I have done the Zoom option through button click. But i have to dont that in Mouse Scrolling option. If anyone please help me to complete this task.

I have attached my code for Zooming option.

Attachment: zoom.rar

Answers (5)

1
Photo of Frogleg
NA 7.9k 33k 13y
Here vc 2008 version
0
Photo of Suthish Nair
NA 31.7k 4.6m 13y
waw.. great sample 5 out of 5 points...
0
Photo of Frogleg
NA 7.9k 33k 13y

Attachment mousezoom.zip

Here's one way
0
Photo of Farooque Ali
NA 266 202.5k 13y
Hi,

Thanks. Here am doing the Zooming from 25% to 400% how to incorporate my code in to this Event. Can you please tell me.
0
Photo of Frogleg
NA 7.9k 33k 13y
To get mouse wheel use

protected override void OnMouseWheel(MouseEventArgs e)
{
if (e.Delta > 0)
{
MessageBox.Show("up");
}
else if (e.Delta < 0)
{
MessageBox.Show("down");
}

}

One detent = 120

look here for more info
http://msdn.microsoft.com/en-us/library/system.windows.forms.mouseeventargs.delta.aspx#Y526