Controls1 C# WinForm 동적으로 생성한 Control 접근하는 방법 C# WinForm에서 동적으로 Controls(Button, Label, ,,,)을 생성 후 작업 중 생성한 Control에 접근하는 방법을 메모해 둔다. 우선 Button을 동적으로 생성해 보자. Button btnTest = new Button(); btnTest.Name = "btnTest"; //Controls 에서 조회키가 되므로 Naming에 신경쓰자. btnTest.Text = "Test"; btnTest.Size = new System.Drawing.Size(100, 30); btnTest.Location = new System.Drawing.Point(50, 50); btnTest.Click += new System.EventHandler(btnTest_Click); this.Contr.. 2021. 5. 13. 이전 1 다음