Solved

Centering a from horixontally ONLY

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Save pdf file to other location 3 72
Convert Jpg /PNG To GIF 5 103
Working this component WebCopy with proxy, help 3 62
LAN or WAN ? 11 66
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

11 Experts available now in Live!

Get 1:1 Help Now