Page 1 of 1

Translucent form: Right click not working

Posted: Wed May 31, 2006 8:28 am
by matteocima
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

Re: Translucent form: Right click not working

Posted: Wed May 31, 2006 9:20 am
by Softanics
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).

Posted: Wed May 31, 2006 10:03 am
by matteocima
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

Posted: Wed May 31, 2006 10:23 am
by Softanics
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.

Posted: Wed May 31, 2006 10:39 am
by matteocima
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.

Posted: Wed May 31, 2006 12:25 pm
by Softanics
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