Right Click Context Menu Strip (custom)

.NET Edition of the F-IN-BOX
dev000001
Posts: 3
Joined: Tue Aug 19, 2008 4:09 pm

Right Click Context Menu Strip (custom)

Postby dev000001 » Tue Aug 19, 2008 4:40 pm

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.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Tue Sep 02, 2008 9:59 am

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.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html


Return to “.NET Edition”

Who is online

Users browsing this forum: No registered users and 26 guests

cron