Accelerator key not working

B

B.

I have a C# winform with accelerator key associated with some menus.
If my exe is in unmanaged C++ and the winform is invoked through
interop, the accelerator key not working. If I create a new C#.Net
project and the same winform is invoked in the C#.Net project, the
accelerator key works perfect.

Does anyone know what special thing I need to invoke accelerator key
if winform is invoked through Interop. Thanks a lot.
 
L

Lloyd Dupont

Your description being incorrect it's hard to tell.

For info: Interop is the way C# can call C.

To call C# from unmanaged C++ you need to use poorly documented COM API.
Or you could use something like the 'exec' function but it should be the
same as double clicking on the managed exe right away.

From what you said so far I will bet you have an unmanaged application and
you host a .NET control as you will host any other COM component.
In such case I could be only of little help but I could suggest that,
perhaps, you should pass the windows message to the hosting control....
 
B

B.

Actually, what I did is not hosting the .net control. Our unmanaged
application shows a Win32 form and user clicks a link to switch to a
enhanced form which is in C#.Net. What I did is I hide the win32 form
and show the .net form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top