重写控件就可以:
新的控件有MyMouseClick事件,跟正常控件事件一样使用就可以
public partial class MyFlashWave : AxShockwaveFlashObjects.AxShockwaveFlash
{
public event MouseEventHandler MyMouseClick;
public delegate void MouseEventHandler(object sender, MouseEventArgs e);
public class MouseEventArgs : EventArgs
{
}
private const int WM_LBUTTONDOWN = 0x0201;
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
switch (m.Msg)
{
case WM_LBUTTONDOWN:
{
MyMouseClick(this, new MouseEventArgs());
}
break;
}
}
}