Hello,
Using D6Ent Update Pack 2 on W2k SP4, I built a trivial program with three
stdbuttons and a memo, filling the memo with the values of Width and Height.
When running the same on XP-SP2 I get different values.
And - more important - controls that are far down or far right are
not visible without unlarging the form. Even worse, controls that are
anchored akRight/akBottom will never become visible! (This symptom is
of course what made me do this little test program.)
Screen resolution is in both cases 1280 x 1024 from SM_CXSCREEN/SM_CYSCREEN.
W2k XP-SP2 diff
Width 413 482 69
Height 276 298 22
ClientWidth 405 405 0
ClientHeight 249 236 -13
Anyone have a clue to what I am missing or what I should do to fix this?
TIA,
Tommy
------------ simple test code ------------
procedure TForm1.Button2Click(Sender: TObject);
procedure DisplMetr(s: string; ix: integer);
begin
Memo1.Lines.Add( Format('%-15s: %d', [s, GetSystemMetrics(ix)]) );
end;
begin
Memo1.Clear;
Memo1.Lines.Add( Format('%-15s: %d', ['Width', Width]) );
Memo1.Lines.Add( Format('%-15s: %d', ['Height', Height]) );
Memo1.Lines.Add( Format('%-15s: %d', ['ClientWidth', ClientWidth]) );
Memo1.Lines.Add( Format('%-15s: %d', ['ClientHeight', ClientHeight]) );
DisplMetr('SM_CXSCREEN', SM_CXSCREEN);
DisplMetr('SM_CYSCREEN', SM_CYSCREEN);
end;
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk