Controls ADD CLEAR
-
this.Parent.Controls.Clear(); this.Parent.Controls.Add(new Window1());
warum geht das nicht?
im hauptfenster existiert ein panel. das panel ruft window2 auf. aus window2 möchte ich im panel(hauptfenster) dann window1 anzeigen lassen.
-
this.Parent.Controls.Add(new Window1());
this.Parent.Controls.Remove(this);