I have a windows application with an MDI form and some child forms.
I need to save the position of the child forms and then restore when it is opened again.
How to do that in C#?
Also, I need to check if the child form’s title bar is not hidden under the mdi form (e.g title bar might get hidden because of mdi form’s menus). If this is the case, then I need to set the position smartly.
Thanks in advance…
Check out this CodeProject article: Restore Form Position and Size in C#
The gist of it is that you have to take the form’s size and location and persist it in the project settings. You’ll have to adapt it slightly to your needs (making sure the form fits within the boundaries of the parent window, etc.).