안녕하세요 저는 몇 가지 하위 폼을 모두 루트 폼에서 상속 받고 몇 가지 단추와 로고 등을 설정하여 하위 항목까지 필터링하도록 설정했습니다. 나는 루트에서 상속받는 하위 폼을 추가 비주얼 스튜디오의 마법사를 사용하고 자동으로 선언됩니다C# 루트 폼 상속, 변경 인해 하위 폼이 깨졌습니다.
지금 버튼을 하위 폼의 크기를 조정하고 이동하도록 요청했습니다public partial class WelcomeForm : MynetInstaller.rootForm
, 일 나는 할 것이다 희망 단순히 루트 양식을 변경하고 변경 사항을 필터 다운 할 수 있습니다.
내가 가진 두 가지 문제는 다음과 같습니다. 1/나는 크기를 변경합니다. 이것은 어린이에게 전혀 영향을 미치지 않습니다. 처음 설치 후 크기가 상속되지 않는 것 같습니다. 난 못해 페이지를로드 계속 누르면,하지만 경우
To prevent possible data loss before loading the designer, the following errors must be resolved:
'child' is not a child control of this parent.
Instances of this error (1)
1. Hide Call Stack
at System.Windows.Forms.Control.ControlCollection.GetChildIndex(Control child, Boolean throwException)
at System.Windows.Forms.Control.ControlCollection.SetChildIndexInternal(Control child, Int32 newIndex)
at System.Windows.Forms.Control.ControlCollection.SetChildIndex(Control child, Int32 newIndex)
at System.Windows.Forms.Design.ControlDesigner.DesignerControlCollection.SetChildIndex(Control child, Int32 newIndex)
버튼과 경우를 이동했다 :
2/I가 버튼의 위치를 변경,이 없다는 오류를 보여주는 휴식 모든 하위 폼의 원인 나는 시도하고 난에 오류가 그것을 실행 말하는
this.Controls.SetChildIndex(this.btnNext, 0);
:
'child' is not a child control
내가 notic 에드가 컨트롤을 움직이면 잠기지 않고 수동으로 변경하면 도움이되지 않습니다.
in my 상속 된 양식 컨트롤 위치가 변경되었습니다. 나는이 문제를 해결했다. .designer.cs 파일에서 제거했습니다. "this.AutoScaleDimensions = new System.Drawing.SizeF (6F, 13F);" 선. –