ghasem deh

ghasem deh

  • NA
  • 258
  • 40k

How to use Mouse_Wheel to zoom in & out

Sep 2 2014 12:13 PM
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 senderMouseEventArgs 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 ...

Answers (5)