|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Accelerator key not workingI 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. 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.... Show quote "B." <guoron***@gmail.com> wrote in message news:1175543495.336941.166500@n59g2000hsh.googlegroups.com... >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. > 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. Show quote On Apr 2, 9:20 pm, "Lloyd Dupont" <net.galador@ld> wrote: > 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." <guoron***@gmail.com> wrote in message > > news:1175543495.336941.166500@n59g2000hsh.googlegroups.com... > > > > >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.- Hide quoted text - > > - Show quoted text - |
|||||||||||||||||||||||