winforms - Custom User Control in C#...Right Click Menu to Copy Text (Java Developer learning C#) -


I am working on a custom user control which essentially displays a name value pair (name on black background) Is a white one) I am displaying my control correctly, even on the designer and on my build page.

What I would like to do from here, it has the ability to right click on user control, which has the "copy value" option, when selected when the "value" portion of user control In the clipboard there will be a copy of the value. What is the best way to approach?

I do not know where most of the user controls have started since the document, I have worked together with the display of control, not necessarily talking with it. In addition, since I'm still learning C #, I have left an important part of my problem in this question, so please tell if this is the case or not.

I am using Visual Studio 2008 (if this is the case)

Check the properties of other controls and control. By specifying ContextMenu control in the context of the second control, you will have wires containing the right-click-> popup menu for you. Then you only need to implement click events of individual menu items in the context menu.

Then you can use the key to set the desired value on the clipboard (as suggested by BFree).


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -