Exiting a Win-App.
Hi !!
I've build a app in which I change the appearance at runtime.
I create new Controls and Delete old ones, but after some time
I have the problem, that I can`t exit.
The app won`t respond on "Close()".
Here`s my code for creating and deleting:
// Create new one
myControl = new UserControl1 ();
myControl .Dock = DockStyle.Right;
myForm.Controls.Add (myControl);
myControl.Show ();
// Delete old one
if (mycontrol != null)
{
myForm.Controls.Remove (mycontrol);
// mycontrol.Dispose (); // Calling Dispose didn`t really help.
mycontrol = null;
}
I`ve no idea what went`s wrong and would therefore thankfull for any hint.
André
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

AdministratorRank #675 · 3.6K reputationPosted Apr 15, 2003, 7:01 AM EDT
AdministratorRank #675 · 3.6K reputationPosted Apr 15, 2003, 9:02 PM EDT
AdministratorRank #675 · 3.6K reputationPosted Apr 15, 2003, 11:34 PM EDT