문제

I want to add all the active forms names to the toolstripmenuitem of MenuStrip in my windows application to know how many and which forms are in open state. If I close any form that perticuller name should delete from menustrip.

도움이 되었습니까?

해결책

Use Application.OpenForms property to get all the opened forms. Something like following.

foreach (Form form in Application.OpenForms)
{
    ms.Items.Add(form.Name);
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top