| Spencer 2004-03-30, 12:41 pm |
| Hi,
Im sure many people have encountered this problem upon testing their
C++/Delphi applications! Quite simply
if you design a form using C++ builder that consists of labels, text input
boxes etc and get the layout as you want
it then compile it - upon running it it should look perfect, however
assumming you are using 96 DPI on your desktop
settings if you now change the settings to 120DPI and then run your
application again you will discover that the
layout is most likely corrupted.
The only way I can think of solving this problem is using the OnCreate event
handler on every form and having an
if statment that checks the DPI (either 96 or 120) and then sets the form
size, font size etc appropriately. Not a nice
solution - and it doesnt support custom DPI settings either.
My question is simple - is there a simple solution to this problem? Im
hoping you can set the form properties approriately
such that it does the rescalling for you - infact I thought the TForm->Scale
property was supposed to resize everything
for you but it doesnt... Alternatively is there a 3rd party C++ Builder VCL
component that can be used to solve this
problem?
I am looking for a C++ Builder solution - but was hoping someone might be
able to help me here even though this
is a DELPHI newsgroup....
I would muchly appreciate any help you could provide.
Best regards
Spencer
|