public partial class Form1: Form
{
Int tick=0;
Public _click ()
{
InitializeComponent();
This. Panel1. MouseWheel +=new MouseEventHandler (Control_MouseWheel);
This. Panel1. MouseDown +=new MouseEventHandler (Control_MouseDown);
This. The listBox1. The MouseWheel +=new MouseEventHandler (Control_MouseWheel);
This. The listBox1. MouseDown +=new MouseEventHandler (Control_MouseDown);
This. PictureBox1. MouseWheel +=new MouseEventHandler (Control_MouseWheel);
This. PictureBox1. MouseDown +=new MouseEventHandler (Control_MouseDown);
}
Void Control_MouseDown (object sender, MouseEventArgs e)
{
Tick++;
This Text=((System. Windows. Forms. Control) sender). The Name + tick. The ToString ();
}
Void Control_MouseWheel (object sender, MouseEventArgs e)
{
If (e.D elta & gt; 0)
{
Tick++;
}
Else if (e.D elta & lt; 0)
{
Tick -;
}
The else
{
Tick=0;
}
This Text=((System. Windows. Forms. Control) sender). The Name + tick. The ToString ();
}
}
Under normal circumstances, listBox1, panel1 pictureBox1 can capture the MouseWheel event, but the target computer only listBox1 events all the time, even if the mouse over the Panel also remains a listBox wheel events, I know this is because the Panel and PictureBox is no focal point control, but the problem is more than 90% of the computer they can capture the roller normal event, where the problem is, how to solve?
CodePudding user response:
Guess these systems have a special topic, in theme overrides the styleTest method: through the window messages received spyxx tool to view the corresponding software
CodePudding user response: