3
Answers

Exiting a Win-App.

Administrator

Administrator

21y
1.7k
1
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)