0
나는 mdi 응용 프로그램이 있습니다. 부모가 이미 새 아이 양식을 열었을 때 이미 열렸던 링크를 숨길 링크가 있습니다. 아이가 이미 열려 있는지 확인하려면 어떻게합니까?MdiChilds 숨기기/표시
A little scenario:
link 1 -> opens Child of type A
link 2 -> opens Child of type B
link 3 -> open Child of type C
Application start:
click on link 1-> check if a child of type A is opened
- yes -> hides the current opened child and shows the A-type Child
- no: -> hides the current opened child and creates a new A-type child and shows it
click on link 2 -> check if a child of type B is opened
- yes -> hides the current opened child and shows the B-type Child
- no: -> hides the current opened child and creates a new A-type child and shows it
etc..
일부 코드는 도움이 될 수 있습니까?
는 ... 감사
UPDATE :이 같은
무엇인가?
foreach (Form aForm in this.MdiChildren)
{
aForm.Hide();
}
foreach (Form f in this.MdiChildren)
{
if (f.Name == "VizualizareArticol")
f.Show();
else
{
VizualizareArticol vv = new VizualizareArticol();
vv.MdiParent = this;
vv.StartPosition = FormStartPosition.Manual;
vv.Location = new Point(0, 0);
vv.Show();
}
}
하지만 작동하지 않습니다 ... Control.Visible에 대한
생각을 이해하지 못했다는 말했다 –
그것은 보이지 않습니다. Therfore if (aForm! = null)은 if (! aForm.Visible)를 확인할 수 있습니다. – Offler