Problem with ContextMenu in AxShockWaveFlash
hi, i used AXShockWaveFlash in my windows application. i want to disable default ContextMenu for shockWaveFlash when my form runs. how i can do it ? thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
jishad shaPosted Jun 1, 2013, 5:33 AM
FroglegPosted Feb 24, 2011, 4:21 PM
namespace WindowsApplication1
{
public partial class Form1 : Form, IMessageFilter
{
public Form1() {
InitializeComponent();
Application.AddMessageFilter(this);
this.FormClosed += new FormClosedEventHandler(this.Form1_FormClosed);
}
private void Form1_FormClosed(object sender, FormClosedEventArgs e) {
Application.RemoveMessageFilter(this);
}
public bool PreFilterMessage(ref Message m) {
// Filter out WM_NCRBUTTONDOWN/UP/DBLCLK
//if (m.Msg == 0xA4 || m.Msg == 0xA5 || m.Msg == 0xA6) return true;
// Filter out WM_RBUTTONDOWN/UP/DBLCLK
if (m.Msg == 0x204 || m.Msg == 0x205 || m.Msg == 0x206) return true;
return false;
}
}
}