111,129
社区成员
发帖
与我相关
我的任务
分享 public partial class Form1 : Form,IMessageFilter
{
public Form1()
{
InitializeComponent();
Application.AddMessageFilter(this);
}
public virtual bool PreFilterMessage(ref Message m)
{
if ((m.Msg == 0x0204 || m.Msg == 0x0205) && m.HWnd == this.axWindowsMediaPlayer1.Handle)
{
contextMenuStrip1.Show(MousePosition.X,MousePosition.Y);
return true;
}
return false;
}
}