Paradox Community

Items in pnews.paradox-development

Subject:Re: Automatically resize forms and all their controls based on display resolution
Date:Sun, 2 Aug 2020 20:18:35 +0200
From:"Ivan" <ivan.moro@web.de>
Newsgroups:pnews.paradox-development
hi tom,

i've my own solution for this problem (different resolutions) - most of it
is a kind of trial and error method (but works since many years).

you need the original resolution (e.g. 1024x768), which has to be used to
develope all forms. then you get with sysinfo the new resoution (e.g.
1920x1080) - from where you get the multiplier for x and y. it works for
nearly all resolutions (but not all looks good after they are resized).

it's a lot of work, but if you really need it, i can post the code and
introduction, what to do (for each form).

short:
you need a resize-table for each form, which contains all items of the form
(buttons with text, fields with text and editregion, lines, boxes, ... and
of course tables with each field of the table and each record (the most
difficult item).
all this you can easily make with enumObjectNames. then i add two new
columns with additional information (if its a table-column header; and if
its a text, which has to be resized too).

btw. it respects different screen resolutions DPI too (but I allow to change
the values only between 96 and 144 - otherwise you can make your app
unusable).

after you made the data for each desired form, it's a little thing, to
resize it on the screen - it's just a small library-method and a call to
this method at the beginnig of the arrive method (wrapped into the
delayScreenUpdates methods).
and of course, you need to hide() the form at the beginning of the init (not
arrive) method - before it is resized - otherwise it flickers on the screen
before it start to resize. after the resize is done, you call the show()
method at the end of the arrive method.


i don't know, if you really want to do it. it's a lot of work (depends of
how many forms you have to change - i have much more than tenthousand and it
needs months of work - but it works since last century unchanged - only 
recompiled with newer pdox version).

let know, if i should post the details.

Ivan



"Tom Krieg" <REMOVEtomkCAPITALS@sdassociates.com.au> schrieb im Newsbeitrag
news:5eccd4fc@pnews.thedbcommunity.com...
> Has anyone ever attempted to write a procedure that automatically checks
> screen resolution and then resizes a form and all it's components and
> tableframes and fields based on the resolution?
>
> The customer had all 1280x720 monitors and has now thrown a few1920 x
> 1080 into the mix and has asked if the "system" could automatically
> adjust the size of the forms to suit.
>
> I've started on this attached form (as you can see, quite complex, the
> top buttons are graphics within boxes within boxes with a label). I'm
> completely lost. As a lot of my forms are "multi functional" like this,
> where a lot can happen from one place. should I just tell the customer
> it can't be done and to wait for my C# rewrite? Or is there someone out
> there that's done this before?
>


---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Copyright © 2004 thedbcommunity.com