Emil Condrea
Emil Condrea

Reputation: 9973

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.

enter image description here

Upvotes: 2

Views: 2074

Answers (3)

Just J
Just J

Reputation: 23

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

Upvotes: 0

Emil Condrea
Emil Condrea

Reputation: 9973

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.

Upvotes: 0

Massimiliano Peluso
Massimiliano Peluso

Reputation: 26737

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

Upvotes: 2

Related Questions