Well again, whether SetBounds is called once or four times, it is called using the parameters you give it in the order you give them. That's the point I was trying to make. If for example you set a top and left only and set bounds was called, then right and bottom would only be restored, or preempted by their anchors to what other components required? I don't know, but I always finds something that works and then what doesn't but should can be compared call by call using Winsite or some other method.
from: Robert Meek at: [EMAIL PROTECTED] dba "Tangentals Design" home of "PoBoy" freeware Windows apps and utilities located at: www.TangentalsDesign.com Proud to be a moderator for the "Delphi Programming Lists" at: elists.org -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Henry Bartlett Sent: Saturday, October 22, 2005 8:28 PM To: Borland's Delphi Discussion List Subject: Re: Win2k window problems I have been using the following code with success in Windows 9X and XP by using tIniFile. Put IniSettings: if WindowState = wsNormal then begin WriteInteger ('Position', 'Top', Top); WriteInteger ('Position', 'Left', Left); WriteInteger ('Position', 'Height', Height); WriteInteger ('Position', 'Width', Width); end; WriteInteger ('Position', 'State', ord (WindowState)); GetIniSettings: Top := ReadInteger ('Position', 'Top', 1); Left := ReadInteger ('Position', 'Left', 1); Width := ReadInteger ('Position', 'Width', Width); Height := ReadInteger ('Position', 'Height', Height); WindowState := TWindowState (ReadInteger ('Position', 'State', wsNormal)); // Note: Window State must come after Top, Left and Height. But this does not store the last normalized position and size if a form is normalized, maximized and then closed. I hadn't previously been aware of SetWindowPlacement. I will have to try it out as it looks as though it may make things a bit simpler. Henry Bartlett Delphi Links Page: ( http://www.hotkey.net.au/~hambar/habit/delflink.htm ) _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

