G
Guy Babbitt
I have an MDI application that starts an instance of a child form at
application start. I have an event handler on a combo box checking
for the selected value to change. When the select value changes, I
call a method on the parent form to change some menu options, and then
I need to close the child form. My code looks something like this:
private void ddlDatabase_SelectedIndexChanged(object sender,
System.EventArgs e)
{
_parent.BuildMenus();
this.Close();
}
The problem is, writing the code this way causes an exception to be
thrown at the following block of code:
static void Main()
{
Application.Run(new MDIParent());
}
on the parent form. I have tried a variety of things, but am not sure
of the right way to go about this.
Can someone shed some light for me?
Guy
application start. I have an event handler on a combo box checking
for the selected value to change. When the select value changes, I
call a method on the parent form to change some menu options, and then
I need to close the child form. My code looks something like this:
private void ddlDatabase_SelectedIndexChanged(object sender,
System.EventArgs e)
{
_parent.BuildMenus();
this.Close();
}
The problem is, writing the code this way causes an exception to be
thrown at the following block of code:
static void Main()
{
Application.Run(new MDIParent());
}
on the parent form. I have tried a variety of things, but am not sure
of the right way to go about this.
Can someone shed some light for me?
Guy