Board index » cppbuilder » Automatic resize to screen resolution problem?

Automatic resize to screen resolution problem?

I have developed 2 applications for testing the DSC functionality for my
company.

Those 2 applications are developed in 800X600 screen resolution
environment.

My development environment is C++ builder 4.0.

Problem:
1) when I execute those program in 640x480 screen resolution, all my
form design(eg. button, memo etc) resize in a very urgly fashion.

2) when I maximise the application, all my form design automatic resize
relative to the upper left of the screen, this situation leave a lot of
empty place at the area near the lower right conner of the screen. Once
again it is very urgly.

Question:
How to overcome the problem so that it can automatic resize the form
according to the screen resolution dynamically by refer to the ratio of
the design time form.

By the way,  thanks Damon for your prompt respond.

 

Re:Automatic resize to screen resolution problem?


That is your problem.
You need to find the "relative" distances between your visual components in
comparison to the whole form size.
Write above the "onresize" or "onpaint" happening in your form and calculate
the new positions and sizes.

If you want to do it all dynamical then you also need to fit the fonts. Its
not to easy.

Regards...

--
Frank Markus Schanzenb?cher
Programmer & Designer 4
visual and audial medias
Germany @ Individual Software GmbH
Http://home.t-online.de/home/XrDEnter
Mailto:Frank_Mar...@t-online.de

Phang Hong Wei schrieb in Nachricht <37424847.8F977...@inventec.com.my>...

Quote
>I have developed 2 applications for testing the DSC functionality for my
>company.

>Those 2 applications are developed in 800X600 screen resolution
>environment.

>My development environment is C++ builder 4.0.

>Problem:
>1) when I execute those program in 640x480 screen resolution, all my
>form design(eg. button, memo etc) resize in a very urgly fashion.

>2) when I maximise the application, all my form design automatic resize
>relative to the upper left of the screen, this situation leave a lot of
>empty place at the area near the lower right conner of the screen. Once
>again it is very urgly.

>Question:
>How to overcome the problem so that it can automatic resize the form
>according to the screen resolution dynamically by refer to the ratio of
>the design time form.

>By the way,  thanks Damon for your prompt respond.

Re:Automatic resize to screen resolution problem?


Why not just develop for 640x480?

Phang Hong Wei <Phang...@inventec.com.my> wrote in message
news:37424847.8F977497@inventec.com.my...

Quote
> I have developed 2 applications for testing the DSC functionality for my
> company.

> Those 2 applications are developed in 800X600 screen resolution
> environment.

> My development environment is C++ builder 4.0.

> Problem:
> 1) when I execute those program in 640x480 screen resolution, all my
> form design(eg. button, memo etc) resize in a very urgly fashion.

> 2) when I maximise the application, all my form design automatic resize
> relative to the upper left of the screen, this situation leave a lot of
> empty place at the area near the lower right conner of the screen. Once
> again it is very urgly.

> Question:
> How to overcome the problem so that it can automatic resize the form
> according to the screen resolution dynamically by refer to the ratio of
> the design time form.

> By the way,  thanks Damon for your prompt respond.

Re:Automatic resize to screen resolution problem?


This has been a problem since Version 1 of Delphi.  I don't know why Borland
doesn't just provide a function that scales a screen and everything on it in
some reasonable fashion.

There is a company out there that sells a component GTSizer for the
outrageous price of $100 that does an okay job on this.  But they're
creeps -- as they want another $100 every time you upgrade.

It's simple enough to get close by just writing a function in the OnShow
handler to adjust for it.   Either loop thru the components on the screen or
just outright adjust height, width, etc.  Of course, you have to figure out
which components have fonts to deal with and adjust those, too.  Anyway, it
doesn't seem too much to ask of Borland to include a simple function call to
just handle this...

Quote
Phang Hong Wei wrote in message <37424847.8F977...@inventec.com.my>...
>I have developed 2 applications for testing the DSC functionality for my
>company.

>Those 2 applications are developed in 800X600 screen resolution
>environment.

>My development environment is C++ builder 4.0.

>Problem:
>1) when I execute those program in 640x480 screen resolution, all my
>form design(eg. button, memo etc) resize in a very urgly fashion.

>2) when I maximise the application, all my form design automatic resize
>relative to the upper left of the screen, this situation leave a lot of
>empty place at the area near the lower right conner of the screen. Once
>again it is very urgly.

>Question:
>How to overcome the problem so that it can automatic resize the form
>according to the screen resolution dynamically by refer to the ratio of
>the design time form.

>By the way,  thanks Damon for your prompt respond.

Other Threads