471,627 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 software developers and data experts.

min max of a form

when we minimize a form and after that when we restore it
( by clicking on windows bar or by right click restore)
where does the form's size and location information is saved?
I need to use it to save it to registry. I know other ways to achive
the same result but I want to know how windows restore a win form
to its original size and location.
Addition to that why X and Y are shown as -32000?
Is it same for every resolution/monitor or depends?
Dec 13 '05 #1
2 1556
when we minimize a form and after that when we restore it
( by clicking on windows bar or by right click restore)
where does the form's size and location information is saved?
In memory associated with the window.

I need to use it to save it to registry. I know other ways to achive
the same result but I want to know how windows restore a win form
to its original size and location.
In v2.0 of the framework the Form class has a RestoreBounds property
you check. In prevous versions I believe you have to call the
GetWindowPlacement Win32 API.

Addition to that why X and Y are shown as -32000?


You can find some history on that here

http://blogs.msdn.com/oldnewthing/ar...28/249044.aspx
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Dec 19 '05 #2
> In v2.0 of the framework the Form class has a RestoreBounds property
you check. In prevous versions I believe you have to call the
GetWindowPlacement Win32 API.


Yes, this is correct. I posted the code on how to call
GetWindowPlacement in this thread:

http://groups.google.com/group/micro...4a1ae6efb32816

Dec 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by John | last post: by
5 posts views Thread by Richard Cornford | last post: by
4 posts views Thread by Targa | last post: by
11 posts views Thread by Jozef | last post: by
6 posts views Thread by Gary Miller | last post: by
4 posts views Thread by Alex Sibilev | last post: by
5 posts views Thread by ortaias | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.