Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Centering a from horixontally ONLY

Posted on 1998-09-11
3
114 Views
Last Modified: 2010-04-06
Hi, is there a way of centring a form on the screen horixontally only. So setting Position to poScreenCenter won't work as I want to keep my vertical setting.

Thanks, Tom.
0
Comment
Question by:tomcorcoran
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
viktornet earned 50 total points
ID: 1339459
YourForm.Left := (Screen.Width div 2)-(YourForm.Widht div 2);

Regards,
Viktor Ivanov
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1339460
In case you need for vertical centering...it's the same.....

YourForm.Top := (Screen.Height div 2)-(YourForm.Height div 2);

Regards,
Viktor Ivanov
0
 

Author Comment

by:tomcorcoran
ID: 1339461
Duh :-) Thanks a lot :-) Tom.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question