Administrator

Administrator

  • Tech Writer
  • 2.2k
  • 1.5m

Exiting a Win-App.

Apr 15 2003 1:58 AM
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é

Answers (3)