C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » Windows »

Disable mdi menu...


Posted Date: 31 Oct 2009      Posted By: gopal      Member Level: Gold     Points: 1   Responses: 1



hi...

i want to disable paticular mdi menu. that is if no chlid form is in active mode
i want to disable particular menu in my mdi form.

if a child form is in active mode then that disabled menu is to be enabled.

how to do this in c#...

need ur suggestions..

regards

gopal.s






Responses

Author: gopal    31 Oct 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

try this:

public void hide()
{
if (this.MdiChildren.Length > 0)
{
saveToolStripMenuItem.Enabled = true;
closeToolStripMenuItem.Enabled = true;

}
else
{
saveToolStripMenuItem.Enabled = false;
closeToolStripMenuItem.Enabled = false;
}
}



=====================
private void ssToolStripMenuItem_Click(object sender, EventArgs e)
{

UserCreation v = new UserCreation();
v.MdiParent = this;
v.Show();
hide();
}



Post Reply
You must Sign In to post a response.
Next : Mobile No Inserting problem in ms access db
Previous : How to get data from a merged xml file?
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use