我有下面的代码,它使用事件为我提供了鼠标位置,我还使用相同的事件和相同的代码Form1._MouseMove
在控件上捕获了鼠标位置。pictureBox
编码:
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);
}
问题是,我有AxShockwaveFlashObject
并且我也需要鼠标位置,但是上面的代码在这个控件上不起作用,因为它没有AxShockwaveFlashObject1._MouseMove
事件。谁能帮我解决这个问题?
笔记:
e.Location.X
&e.Location.Y
给了我同样的结果。