Solved

How can I make the menu accessible to other form?

Posted on 2006-06-29
4
189 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
  • 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

785 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