public Form1()
{
InitializeComponent();
this.pictureBox1.MouseWheel += new MouseEventHandler(PictureBox1_MouseWheel);
}
private void PictureBox1_MouseDown(object sender, MouseEventArgs e)
{
this.pictureBox1.Focus();
}
private void PictureBox1_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
{
if (e.Delta > 0)
{
this.Text = "Mouse Wheeled Up";
pictureBox1.AutoScrollPosition = new Point(panel2.Location.X, vScrollBar1.Value);
// Panel1.VerticalScroll.Value -= e.Delta;
// Panel1.Refresh();
}
else
{
this.Text = "Mouse Wheeled Down";
}
}