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 OriginalGriff 355
1 Arun Vasu 345
2 Sergey Alexandrovich Kryukov 338
3 Maciej Los 208
4 Zoltán Zörgő 189
0 Sergey Alexandrovich Kryukov 9,755
1 OriginalGriff 7,559
2 CPallini 4,018
3 Rohan Leuva 3,362
4 Maciej Los 2,951


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