Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 200
  • Last Modified:

How can I make the menu accessible to other form?

I am a new bee in vb.net... so please bear with me...

I have a MDI form...

I have menu named New... when I clicked on the New menu, form2 will show then the menu will disabled...  now how can I make the menu enabled when form2 closed?

can you provide me with code please?
Jack
0
JackOfPH
Asked:
JackOfPH
  • 2
  • 2
1 Solution
 
arif_eqbalCommented:
Use events to notify the Parent that a Child From has closed
Here's how
you must be doing something like this on the MDI form to open a new child form

Dim F as New form2
F.MDIParent = me
F.Show

now add an event hadler as well

Dim F as New form2
F.MDIParent = me
AddHandler F.FormClosing, AddressOf ChildClosing
F.Show

then have a function in MDI

    Private Sub ChildClosing(ByVal sender As Object, ByVal e As Windows.Forms.FormClosingEventArgs)
        yourMenuItem.Enabled=True
    End Sub
0
 
JackOfPHAuthor Commented:
will try your suggestion...
0
 
JackOfPHAuthor Commented:
Thank you for helping me... I appreciate it really...

Jack
0
 
arif_eqbalCommented:
My Pleasure
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.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now