I have below code which gives me mouse location using Form1._MouseMove
event, I also captured mouse location over pictureBox
control using the same event and the same code.
The Code:
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
yAxis = (((768 / 2) - Cursor.Position.Y) * 45 / (768 / 2));
xAxis = (((1024 / 2) - Cursor.Position.X) * 45 / (1024 / 2));
player.FlashVars = string.Format("YAxis={0}&Rot={1}", yAxis, xAxis);
}
The problem is, I have AxShockwaveFlashObject
and I need the mouse location over that too but the above code does not work on this control because it doesn't have AxShockwaveFlashObject1._MouseMove
event. Can anyone please help me to solve this?
Note:
e.Location.X
& e.Location.Y
gave me same result.