Problem with ToolStrip selection under Menue Strip
Hi all,
I am working with C# (Asp.Net 3.5 ) Window Application.
I have a problem to De-Select ToolStrip under menueStrip. I am calling a page by clicking a link from ToolStrip under menueStrip and makeing the toolstrip disable, and the new page is opening. Now problem is that when I am closing the new page clicking Exist button that time I want to enable that particular ToolStrip.
code:-
ParentMenu.cs:-
namespace MFI_Windows
{
public partial class ParentMenu : Form
{
public partial class ParentMenu : Form
{
NEW_AGENT obj_new_agent = new NEW_AGENT();
}
private void newAgentToolStripMenuItem_Click(object sender, EventArgs e)
{
obj_new_agent = new NEW_AGENT();
obj_new_agent.MdiParent = this;
obj_new_agent.Show();
if (newAgentToolStripMenuItem.IsDisposed == false)
{
newAgentToolStripMenuItem.Enabled = false;
}
else
{
newAgentToolStripMenuItem.Enabled = true;
}
}
}
}
New Agent.cs:-
private void btn_Exit_Click(object sender, EventArgs e)
{
this.Hide();
//next_page();
}
I want after the exit button code execution again the toolstrip for new agent will be enable.
Please someone help me to overcome this issue.
With regards
Somesh Chatterjee
|