Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Make MenuStrip Item Visble False from another form

$
0
0

I have a MDI form with a MenuStrip on it.

I have another child form for the MDI Form.

What I would like to do is that when the Child Form closes it hides one of the items on the MenuStrip on the MDI Form.

I made the MenuStrip on the MDI Form Public.

then in the Child Form on the Disposed Event I put

mdiForm.MenuStrip1.Items("Open").Visible = False (Open is the name of the item on the MenuStrip I want to hide)

but I get an error "Reference to a non-shared member requires an object reference "

Please help

Thank you


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>