Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have like 40 label on panel and i'm trying to use contextmenustrip on each one of them like when i press right click on label1 the contextmenu show and it have a hide option so it hide label1 and then when i press right click on label4 the same option hide show and hide label4 is that possible ? plz help
i used this code but the code this.Hide() gonna hide the form ik that this use for form
anyway to hide each label alone?

What I have tried:

private void removeToolStripMenuItem1_Click(object sender, EventArgs e)
     {
       this.Hide();
     }
Posted
Updated 11-Nov-19 1:02am
v2
Comments
Richard MacCutchan 11-Nov-19 7:35am    
Check the object that sends the message in your event handler, so you know which one to hide.
Member 14630006 11-Nov-19 7:47am    
ik which one but i have like 40 label and in contextmenustrip right click on each label it gonna hide the label that click and press hide
Member 14630006 13-Nov-19 9:47am    
none gonna answer the question not even a little idea?
Member 14630006 13-Nov-19 12:22pm    
great website u have here guys thanks alot :)

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