0
하나의 사용자 정의 컨트롤 인스턴스가 두 가지 다른 형태로 실행될 수 있습니까?하나의 usercontrol 인스턴스를 여러 폼에 가질 수 있습니까?
다음 작업을 수행했지만 작동하지 않았습니다 (컨트롤이 마지막 양식에만 표시됨).
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var control = new UserControl1();
var form2 = new Form2();
form2.UserControl1 = control;
form2.Show();
var form1 = new Form1();
form1.UserControl1 = control;
Application.Run(form1);
}
흠 맞아요. 새 프로젝트에서 직접 해보았습니다. (편집 참조). 어쨌든 고마워. – Enrico