bradaker

Is there a way to programmatically cause a menu item click on one of the two main menu items In other words I need to pop up the first level submenu automatically without the user tapping the menubar item to do it. If this can't be done in the .net cf, then an interop solution or suggestion of some kind would also be welcome.

Thank you very much for any help you can provide.

Brad



Re: .NET Compact Framework Programmatically cause submenu to pop up?

Peter Nowak (Germany)

Hi,

sorry, but I can only help you with the first part: The requested functionality isn't available in the .NET CF.

Cheers, Peter





Re: .NET Compact Framework Programmatically cause submenu to pop up?

Alex Yakhnin MSFT

I am not sure why need to do that, but you could always call the menu event handler in your code.






Re: .NET Compact Framework Programmatically cause submenu to pop up?

bradaker

Thanks for the responses, but calling the menu event handler is not actually what I needed to do. I needed to pop up the submenu without having the user tap the on-screen main menu item to do it. The reason is because I needed the user to be able to press a hardware key on the device to pop up the menu, but there are no "soft keys" associated with the menu items on this particular device (didn't know they were called soft keys until recently). I found that I could use interop to call keybd_event() to simulate the soft keys being pressed (VK_TSOFT1 or VK_TSOFT2).