Page 1 of 1

Right Click Context Menu Strip (custom)

Posted: Tue Aug 19, 2008 4:40 pm
by dev000001
I am not having any luck getting a custom contextmenustrip to show.

I have tried standard menu false. Assign a context menu, or contextmenustrip, and nothing shows up.

The mouseUp event is never triggered when I right click the control, only left click.

Does assigning a contextmenustrip in code or through designer not work by default? What is necessary to hook this up?

Thanks.

Posted: Tue Sep 02, 2008 9:59 am
by Softanics
Thank you for your question.

Actually, when you use a f-in-box control in transparent movie, ContextMenu doesn't work properly. I hope we'll fix it soon. I'm ready to suggest you a workaround:

Code: Select all

       public class MainForm : System.Windows.Forms.Form, IMessageFilter
       {
...
               private void MainForm_Load(object sender, System.EventArgs e)
               {
                       Application.AddMessageFilter(this);
...
               }

               private const int WM_RBUTTONUP = 0x0205;

               public bool PreFilterMessage(ref System.Windows.Forms.Message msg)
               {
                       if (msg.HWnd == f_in_box__control2.Handle)
                       {
                               switch (msg.Msg)
                               {
                                       case WM_RBUTTONUP:
                                       {
                                               MessageBox.Show("WM_RBUTTONUP"); // <-- your action here!

                                               break;
                                       }
                               }
                       }

                       return false;
               }


Thank you.