How to disable/enable Menu Strip?

VAer-4038 771 Reputation points
2021-01-02T05:50:58.47+00:00

I have a mdi parent form, let's call it MainForm, which has menustrip. Each menu button opens a child form.

I have a child form called LoginForm

When MainForm is loaded, LoginForm will show up. But at the meanwhile, I would like to disable menustrip or gray out menu strip, whatever it is called, user shouldn't do anything before logging in.

So how should I write the code(in MainForm) to disable menu strip?

After successfully logging in, the menu strip should be enabled. So this piece of code will be in LoginForm. How should I write the code (in Login Form) to enable menu strip? The issue is: menu strip belongs to MainForm, how can LoginForm code reaches MainForm menu strip?

Thanks.

Developer technologies | Visual Studio | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 90,686 Reputation points
    2021-01-02T08:21:53.813+00:00
    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.