Get list of open windows form instance that are excuted from different assembly

后端 未结 5 1127
醉话见心
醉话见心 2020-12-10 08:26

I have a \'loader app\' that loads a menu and when user clicks the menu image button a list view opens based on the text

(if text = employee)  
(Go to class         


        
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-10 09:20

    Another simple example

    private Boolean FindForm(String formName)
        {
            foreach (Form f in Application.OpenForms)
            {
                if (f.Name.Equals(formName))
                {
    
                    f.Location = new Point(POINT.X, POINT.Y + 22);
                    return true;
                }
            }
    
            return false;
        }
    

提交回复
热议问题