Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why XP puts scroll bars on my form 1

Status
Not open for further replies.

Euphaz

Programmer
Jul 12, 2001
40
NO
My form size is 480 x 640 pixels, screen set to 800 x 600.
Windows XP puts scroll bars on both X and Y, and doesn't remove them when increasing program window. The range of the scrolling is only a few pixels!

Anyone had this problem? I am using Delphi 4, maybe i cannot run my programs on XP then?
 
The problem is that in Windows XP, the title bar at the top of the window is a few pixels bigger. Delphi doesn't really think about this, so it places all the controls on your form a few pixels lower.

To solve the problem, make sure the bottom 8 pixels or so of your window are empty. If you have to have components that are flush to the bottom of the window, you could try making them aligned alClient, or anchored akBottom and see what happens.

To save you running back and forth between machines for testing, you can simulate the problem on your Win9x or WinNt4 development box by going to the display settings control panel and setting a larger font for the title bar.

You can also set AutoScroll for your forms to False. This is suboptimal, since it will also prevent scroll bars appearing when they should (for example, if your app is run on a 1024x400 palmtop, or something). -- Doug Burbidge mailto:dougburbidge@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top