Translucent form: Right click not working

.NET Edition of the F-IN-BOX
matteocima
Posts: 8
Joined: Wed May 31, 2006 8:17 am

Translucent form: Right click not working

Postby matteocima » Wed May 31, 2006 8:28 am

Hi,
I am evaluating your product but i found some problems that stopped me



When in a translucent form the property .DefaultMenu is not longer working and is always set to false, and the mousedown events are not fired on the form.



I am using vs2005 and FlashPlayerControlForDotNet_2_0_11

Any news about this?

Regards,
Matteo

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

Re: Translucent form: Right click not working

Postby Softanics » Wed May 31, 2006 9:20 am

Thank you for your question.

matteocima wrote:When in a translucent form the property .DefaultMenu is not longer working and is always set to false, and the mousedown events are not fired on the form.


See the code of the example Sample4_Translucency (file MyTranslucencyForm.cs):

Code: Select all

protected override void WndProc(ref Message m)
{
   if (WM_NCHITTEST == m.Msg)
   {
      m.Result = new System.IntPtr(HTCAPTION);
   }
   else
   {
      base.WndProc(ref m);
   }
}


The form handles WM_NCHITTEST to allow user drag the window. If you comment this:

Code: Select all

protected override void WndProc(ref Message m)
{
//         if (WM_NCHITTEST == m.Msg)
//   {
//      m.Result = new System.IntPtr(HTCAPTION);
//   }
//   else
//   {
      base.WndProc(ref m);
//   }
}


...right click event will work. And the standard menu too (if .StandardMenu = true).
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

matteocima
Posts: 8
Joined: Wed May 31, 2006 8:17 am

Postby matteocima » Wed May 31, 2006 10:03 am

Hi,
thanks for your reply.

I tried and it is not working!

I commented out the lines you suggested (leaving the base.WndProc(ref m); uncommented) and now i have this.StandardMenu = true; in the InitializeComponent() of the form, but still not seeing the menu.

Tried both vs2003 and vs2005.

Regards,
Matteo

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

Postby Softanics » Wed May 31, 2006 10:23 am

I've created a small example. Please download it:
http://f-in-box.com/TEMP/for_matteocima.zip

Test it. It demonstrates how to enable standard flash menu and how to ShowInTaskBar = false works.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

matteocima
Posts: 8
Joined: Wed May 31, 2006 8:17 am

Postby matteocima » Wed May 31, 2006 10:39 am

Thank you for your reply,

but i still can't see the menu when i right click. Tried on more than one pc, and even with the new 2.0.12 version.

Any ideas?

Please contact me on icq.
Matteo.

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

Postby Softanics » Wed May 31, 2006 12:25 pm

Yes, you are right. There was one small mistake in the example. Now it should work properly:
http://f-in-box.com/TEMP/for_matteocima1.zip
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 20 guests

cron