C#技术百科
问问你的心你有没有信心 做事情要专一坚定,执着

        public bool CheckMdi(string formName)
        {
            bool state = false;
            foreach (Form tempForm in this.MdiChildren)
            {
                if (tempForm.Name.ToLower() == formName.ToLower())
                {

                    if (tempForm.WindowState == FormWindowState.Minimized)
                        tempForm.WindowState = FormWindowState.Normal;
                    tempForm.Activate();
                    return true;

                }
                else
                {
                    return false;
                }
            }
            return state;
        }

posted on 2008-09-06 16:48  王德田  阅读(128)  评论(0编辑  收藏