Click here to Skip to main content
16,018,006 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi,

I'm trying to make a dropdown menu where I can select an available printer. I can display the available printers, no problems so far. But how can I recognize if someone clicks on the menu item?
I.E.

C#
string printername = "GX430t" // note: this is a variable name, depends on the printer name installed.

select printerNameMenuItem.DropDownItems.Add(printername); // here do I add the new printer to the menu item.


How do I add an event to the added item, which activates when the user clicks on the menu item?
Posted
Comments
pieterjann 25-Sep-12 11:17am    
Please do not downvote questions without commenting why. I did my research, but could not find what I needed. If the question is not asked properly, edit my question or ask me to make it more clear. I am not asking for complete code, just for a hint in the right direction.

1 solution

Put a brake point on Menu1_MenuItemClick event, you will get your solution.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900