Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 196
  • 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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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