首页  编辑  

截获鼠标滚轮

Tags: /C#/界面处理/Form/   Date Created:

public Form1()

{

   InitializeComponent();

   (( Control ) this ) . MouseWheel += new MouseEventHandler (Form1_MouseWheel);

}

void Form1_MouseWheel( object sender , MouseEventArgs e)

{

    if (pictureBox1 . Bounds . Contains(e . Location))

       Text = e . Delta . ToString();

}