Board index » cppbuilder » TForm - Maximizing & Minimizing

TForm - Maximizing & Minimizing


2005-03-08 04:25:59 PM
cppbuilder90
I create a simple BCB application using default properties for the main
form. If I maximize the form and then minimise it, it returns to its
original size and position. (i.e. in the maximised state the form still
remembers its minimised size and position).
Is it possible to access the properties/variables in which the last
minimised size and position of the TForm are stored.
If my form is maximised and the application is terminated, I want to record
enough info in the registry so that when executed again, the application
comes up maximised, but can return to its last minimised state.
 
 

Re:TForm - Maximizing & Minimizing

"Marco" < XXXX@XXXXX.COM >wrote:
[snip]
Quote
Is it possible to access the properties/variables in which the
last minimised size and position of the TForm are stored.
[snip]
Yes. Use GetWindowPlacement for that:
WINDOWPLACEMENT WindowPlacement;
GetWindowPlacement(this->Handle, &WindowPlacement);
// use WindowPlacement.rcNormalPosition.left,
// .right, .top and .bottom
 

Re:TForm - Maximizing & Minimizing

Thank you very much.
 

{smallsort}