Solved

Centering a from horixontally ONLY

Posted on 1998-09-11
3
111 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now