Solved

How can I make the menu accessible to other form?

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now