Click here to Skip to main content
Sign Up to vote bad
good
See more: C#
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.
 
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 25 Sep '12 - 4:58

Comments
pieterjann - 25 Sep '12 - 11:17
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.
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 479
1 Arun Vasu 253
2 OriginalGriff 210
3 CPallini 163
4 Aarti Meswania 158
0 Sergey Alexandrovich Kryukov 10,129
1 OriginalGriff 7,749
2 CPallini 4,181
3 Rohan Leuva 3,482
4 Maciej Los 2,999


Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid