I have a problem which only occurs on Windows 2000 workstations.  XP and 
Win9x work fine.

I'm storing the window sizes and positions of several windows when 
closing my app.  I'm using similar code to the following when my program 
loads:

 with WindowPlacement do //(TWindowPlacement)
 begin
    Length := Sizeof(WindowPlacement);
    rcNormalPosition.Top := Reg.ReadInteger('Top');
    rcNormalPosition.Left := Reg.ReadInteger('Left');
    rcNormalPosition.Bottom := Reg.ReadInteger('Bottom');
    rcNormalPosition.Right := Reg.ReadInteger('Right');
    showCmd := SW_HIDE;
    SetWindowPlacement(MyForm.Handle, @WindowPlacement);
    MyForm.WindowState := TWindowState(Reg.ReadInteger('State'));
 end;

In one example, a form has a ListView which is anchored at Top, Left, 
Bottom, and Right.  On Win2k (and only Win2k), the listview does not 
resize when the window is resized.  It stays the same size so you end up 
with blank space to the right and bottom when the form is made bigger or 
maximized.  It's as if the 4 Anchors are set to False.  This only occurs 
after the above code is run.

The reason for using SetWindowPlacement is so the restored size of the 
windows are stored and loaded regardless of whether the form is 
maximized or not.  The user can then Restore to the original form size.

I don't have Win2k here so it's my users who have reported this problem 
and I can't test any changes here to resolve it.

Any ideas?

Thanks,
Ross. 

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to