하고 싶은 기본적으로 찾기 제어하의 위치를 기반으로 이름입니다. 이것은 내가 지금까지:
private Point FindControlLocation(string ControlName, Control ParentControl)
{
//Code...
}
어떤 도움을 주셔서 감사합니다!
하고 싶은 기본적으로 찾기 제어하의 위치를 기반으로 이름입니다. 이것은 내가 지금까지:
private Point FindControlLocation(string ControlName, Control ParentControl)
{
//Code...
}
어떤 도움을 주셔서 감사합니다!
당신이 실제로 필요하지 않은 상위 제어,그냥 양식을 사용하고 재귀에서 옵션을 Controls.Find()
:
private Point FindControlLocation(string ControlName)
{
Control ctl = this.Controls.Find(ControlName, true).FirstOrDefault() as Control;
return (ctl != null) ? ctl.Location : new Point();
}