yanmai
Goto Top

C-sharp Control auf andere Form übertragen

Hallo liebe Administratoren,
ich habe auf der Form1 eine TextBox, die ich auf Form2 übertragen möchte.

var box = this.panel1.Controls as TextBox;
form2.Controls.Add(box);

An sich funktioniert es, aber jetzt ist die TextBox auf der Form1 weg. Wie kann ich es machen, dass die TextBox übertragen wird?

Content-Key: 334540

Url: https://administrator.de/contentid/334540

Printed on: April 25, 2024 at 22:04 o'clock

Mitglied: 132895
132895 Apr 08, 2017 at 10:57:05 (UTC)
Goto Top