Should be:
Left := (Screen.width - newFormWidth) div 2;
If newFormWidth is larger than the screen width, that's an exercise
for the user.
At 07:53 PM 3/28/2013, SoftTech wrote:
Greetings,
Delphi 5.1
I have a need to change the width of a form (larger or smaller) when
the user clicks a button and programmatically re-center the form.
Any code on how to accomplish this would be appreciated.
Thanks,
Mike
__________________________________________________
Delphi-Talk mailing list -> Delphi-Talk@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk
__________________________________________________
Delphi-Talk mailing list -> Delphi-Talk@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk