enable and disable menu items of mdiparent from loginform in c#

i have two form,home and login.On home there is menu called file and menu items like login,logout when i run the application login form will open and after login home page will open.menuitems on home form will enabled=true when login is successfully i click on logout menu this will enabled=false all menu other than login.When i click on login menu login form will open,after successfull login my home form menu should be enabled=true

So my problem is that i am not been able to enabled=true menu from my login form


Hope you are showing LoginForm as ShowDialog(), not MDI Child. And if your Login is successful you can set the dialog result to OK or Yes. And in the next statment you can enable / disable the menu items

FrmLogin frmLogin = new FrmLogin();
if(frmLogin.ShowDialog() == DialogResult.OK)
//Enable menu here.

Hope it works :)

Don't do it from your login form but from the main form. Also don't do it immediately after login but each time the menu is about to be opened, set each item enabled property.

Need Your Help

Change on of the 5 drop downs in the cascading drop down list sequence manually, but have the cascading effect work anyway


I have a form which has 5 cascading drop downs (Asp.Net AJAX). I need to now set the value of the 2nd drop down manually (via javascript), but have the remaining drop downs cascade based on the val...

DB2 error on TSQL using SELECT AS alias and an inner join

tsql select db2 syntax-error

I am writing a T-SQL program over a DB2 database on a LINUX box (DB2/LINUXX8664) using a linked server. I think the DB2 is Version 9.5.3 but not certain. I am receiving an error that I feel is like...