.Net Compact Framework using Context Menu

A

andrew

I have added a context menu to a form and used the popup event to add
menu items to the menu, this is in a Mobile Device Application
(suprise, suprise)

This works fine and the items appear when clicking, say a list view,
great!!

However there does not appear to be an obvious way in which you
capture a menu click event.

This is not a problem when using a standard windows application as it
allows you to use "Address of" etc and tie it all up

Does anyone know how to do this using the CF version of .net and the
context menu

thanks

Andrew
 
S

Steven

Why don't you just respond to the individual menu_click
events? If you are adding menu items on the fly, just add
an event handler when you add the menu item. In VB.Net,
the syntax is:

AddHandler mnuFirstMenu.Click, AddressOf
Me.MenuEventHandler

In C# the syntax is:

mnuFirstMenu.Click += new EventHandler
(this.MenuEventHandler);
 

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