min max of a form

  • Thread starter Thread starter Pohihihi
  • Start date Start date
P

Pohihihi

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?
 
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/archive/2004/10/28/249044.aspx


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top