Solved

How can I make the menu accessible to other form?

Posted on 2006-06-29
4
190 Views
Last Modified: 2010-04-23
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
Comment
Question by:JackOfPH
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 125 total points
ID: 17008145
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
 
LVL 15

Author Comment

by:JackOfPH
ID: 17014908
will try your suggestion...
0
 
LVL 15

Author Comment

by:JackOfPH
ID: 17015463
Thank you for helping me... I appreciate it really...

Jack
0
 
LVL 19

Expert Comment

by:arif_eqbal
ID: 17015932
My Pleasure
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question