contextMenuStrip

i want examples about contextMenuStrip
how i use in my form and benefit of it
ziayd2009Asked:
Who is Participating?
 
Asim NazirConnect With a Mentor Commented:
it works in first attempt. Make sure you are adding this code in ContxtMenuItem's click event - as given below:

private void cToolStripMenuItem_Click(object sender, EventArgs e)
        {
            textBox1.Text = cToolStripMenuItem.Text;
        }

Let me know if you need further help.
Asim
0
 
himanshutCommented:
here the vid tutorial for contect menu:

http://www.youtube.com/watch?v=nFyH0McZz18
0
 
Kalpesh ChhatralaSoftware ConsultantCommented:
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
Asim NazirCommented:
Hi,

Follow this http://en.csharp-online.net/Create_and_configure_a_ContextMenuStrip
You can also download sample application.

Asim
0
 
ziayd2009Author Commented:
sory but i work in visaul basic 2005 staudio
win aplaction
0
 
Asim NazirCommented:
Mainly, ContextMenu provides you ease of use.

Here are steps to use Context menu:

1. drag and drop contextmenustrip on the form.
2. Select the control/form and in the properties set ContextMenu property to your dropped contextmenustrip. It should be available in the Dropdown for ContextMenu property.
3. Add some items to contextmenu.
4. add events to menu item by double clicking it or by using events window.

Please see the screen shot attached.

 Adding context menu to form
Let me know what else you need.
Asim
0
 
ziayd2009Author Commented:
ok this great
but i great Context Menu have 3 itimes and textbox
in Context Menu  items
1-A
2-B
3-c
when i do rghit click in textbox show 3 items
how i get A orB or C in textbox
EX. when i do rghit click in textbox show Context Menu 3  items
i click  on c
textbox text is = c
0
 
Asim NazirCommented:
On clicking C, you want to set Textbox's text to C or you want to show text in textbox on some label/message box?
0
 
ziayd2009Author Commented:
when i clicking C
i want  show text in textbox
LIKE IN PICTURE
bmE.JPG
0
 
Asim NazirCommented:
Handle context menu item click event and do further processing there...
You can do this by double clicking C item. This will add event handler to you code file and then you can set text to textbox in that handler.

Let me know if you need further help.
Asim
0
 
ziayd2009Author Commented:
i use tihse ccde
Me.TextBox1.Text = Me.ContextMenuStrip1.Text
but nothing appear in textbox
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.