How to use Mouse_Wheel to zoom in & out
How to use Mouse_Wheel to zoom in & out pictureBox ...
i use this code :
namespace Test_Code_Csharp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
pictureBox1.MouseWheel += new MouseEventHandler(pictureBox1_MouseWheel);
}
void pictureBox1_MouseWheel(object sender, MouseEventArgs e)
{
pictureBox1.Height += e.Delta / 60;
pictureBox1.Width += e.Delta / 60;
pictureBox1.Top -= e.Delta / 120;
pictureBox1.Left -= e.Delta / 120;
}
But no happen ! no error ! and no ...