Resize form title bar height at run time

I've an application written in D7 that was designed to 'just fit' in an 800x600 window.  With the popularity of EeePC and others at 800x480, I need to resize everything.

I've managed to fit everything (manually code) in this 800x480, but have had to change the BorderStyle to bsSizeToolWin.  This works great in Win2K - but the title bar height under XP and Vista is such that some of my controls are cropped...

So, how might I (at run time) change the title bar height using Delphi 7?


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This may not be exactly what you are looking for however it may suit your proposes
BorderStyle := bsSizeToolWin;
It will make your title bar smaller however you loose you minimize and maximize icons.
edboredAuthor Commented:
That's exactly what I'm doing now (as per original post). That works just fine in Win2K - and obviously changes the title bar under Vista and XP - just not enough!
I'm looking for a way to have a 'compact mode' - that can be turned on and off at run-time. I've found many posts here that allow me to configure the size of the title bar when the form is first created (intercept a bunch of messages) - it just isn't clear to me how I'd do this AFTER the form has been created - (again, I need to toggle 'standard mode' to 'compact mode' at run time).
Thanks for posting.
I apologize for not reading the question carefully enough.

Anyway I don't think you can gain control over just one of the title bars. I believe that you would have to make the change at the OS level - as is you had gone into Advance Appeance Settings of Windows.

This may not be accepable in which case you will somehow have to make you're application screen fit into a slightly smaller place.

Another approach would involve eliminating the Title bar altogether using bsNone and creating one of your own but now you would need to handle mouse down, mouse up, and mouse move events in order to handle form moves and resizes. It could get complicated.

Yet another posiblilty is to look into various "skins" addons. I don't know much about them but perhaps there is an easier solution to be found there.

Good luck :)

edboredAuthor Commented:
I found this link:
Pretty old, but might send me in the right direction.
Not sure how to close this - should this be 'self-solved'? Your idea of eliminating the title bar would work - just not what I was looking for,...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
This is a useful link. You should request to close the question accepting your comment as the solution.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.