简体   繁体   中英

C# set location of a minimized form

I am developing an application in C#. I have a Main Form where I have some buttons that give the user the possibility to start a new form into the Main Form.

When there are more of this kind of forms opened and the user choose to minimize one, it goes to back behind all opened forms. So if the user would want to open again that form he must close/minimise all forms.(for beeing able to see the minimized one)

How can I manage the minimised form location so it could be visible after it is minimised? I tried without any result stuff like that: bringToFront, Activate, Focus, etc.

My Main Form contains the buttons and a panel, so the forms are opening in the panel bellow the buttons.

在此处输入图像描述

why don't you go for MDI win-form? I think they fit really well in what you are trying to achieve

http://msdn.microsoft.com/en-us/library/ms973874.aspx

I know this is late post but might be useful for someone like me. Try this this was working for me to set minimized window location and size as well


https://social.msdn.microsoft.com/Forums/windows/en-US/d6014e48-2adb-4096-8bea-94c2f3b1c47c/how-to-change-the-location-of-a-minimized-mdichild-form?forum=winforms

Finally I did managed myself to solve the problem. It was so simple.

For the forms that opens in the panel child I removed

formName.Dock = DockStyle.Fill;

and I set the formName.Height = panelContainer-25; So now the little form minimized is visible.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM