mike55 Posted March 18, 2005 Posted March 18, 2005 Hi all, Am attempting to write a simple windows booking application, that allows me to add and modify, rooms, clients, staff, and bookings. I have a log in form that the user must use to gain access to the program, they are then moved to mainForm, which has a menu with a number of options that redirect you to the correct form. I want to disable the menu item that was selected prior to a form being displayed, and then want to reenable it when the particular form is closed. However I am unsure/unable to call a method in the mainForm that would do the enabling. Any suggestions. Mike55 Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
stustarz Posted March 18, 2005 Posted March 18, 2005 1) Use the menu options click event to disable the item once the new form has been opened/displayed 2) In the new form, raise an event that your main form will handle that can then re-enable the menu option when your new form is closing Quote Visit: VBSourceSeek - The VB.NET sourcecode library "A mere friend will agree with you, but a real friend will argue."
Leaders snarfblam Posted March 18, 2005 Leaders Posted March 18, 2005 In your main form you can store a reference to the opened form and handle its closed event and in the handler re-enable the menu item. Also, just a recommendation: Instead of disabling the menu items, when the user clicks a menu item that should open a form that is already open, why not just focus that form. That is what I usually do. Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.