3.51 increases Form size after compile

Started by Eddy Van Esch, January 25, 2012, 08:31:26 AM

Previous topic - Next topic

Marc van Cauwenberghe

Jose, your freaking me out too :o :o
If Paul does get this apparently huge job done, do I still need be to know about of all of this? :(

Regards,
Marc


José Roca

#31
Quote from: Marc van Cauwenberghe on January 30, 2012, 12:06:23 PM
Jose, your freaking me out too :o :o
If Paul does get this apparently huge job done, do I still need be to know about of all of this? :(

Regards,
Marc



Indeed. I guess that you will need to add some code of your own, and if you don't know the rules, how are you going to write it correctly? The old WinAPI GDI functions aren't DPI aware, so you need to multiply or divide by a ratio the returned results if you or your customers are going to use a DPI different of 96. Of course, I have wrappers to easy it, but you still need to know the rules to know which ones and when you have to use them.



José Roca

Quote from: Jim Dunn on January 30, 2012, 11:33:00 AM
Jose, could you use a copy of Windows XP ???

Thanks, but I currently don't have room for it. I bet I will work, just haven't seen it. Anybody using XP can test it easily. Change it to use large fonts or a custom font and run CSED. If it works fine, no further tests are needed.


Marc van Cauwenberghe

Well,
I am a different kind of programmer than you Jose. I really do not care about DPI and such.
I am trying to write program logic to help my clients  with there job.
That was one of the main reasons the I changed from VB.
Having to deal with that will be a pain . . .

Don't get me wrong, from time to time I have go deeper and even use some direct Api calls to get it the way I want it to be.
But worrying about such things as the clients screen DPI is troubling me.

I sure hope you stay online for a couple of year to go.

Regards,
Marc

José Roca

Well, you have other alternatives:

1) Use lower resolutions and 96 DPI.

2) Do the same as almost everybody is doing now: don't make your application High DPI aware and let Windows to run your application virtualized as if you were using 96 DPI. If you have artifacts and other weird things, close the program and run it again. Note: Warn your Windows 7 customers to use only Aero themes.

3) Ask Paul to add an option to not do scaling and buy a magnifier to read the text.

4) Write console applications.

José Roca

Graphics guys have additional problems: they have to buy faster and more expensive graphic cards and faster GPUs. Simple: more resolution means that you have to draw more pixels. The files, of course, will be much bigger.

Marc van Cauwenberghe

#36
Jose,
that is not fair  :(

I know my understanding of English/American is not that great because I got into a nasty discussion with the mythy BOB one time.
I still do not understand what I said wrong.
Therefore, is there a reasonable solution among your suggestions or are you giving me in some kind of message that I should learn this.
'Buy a magnifier', 'write a console application' is not what I see as a solution. The rest I do not have a clue what you mean.

Regards,
Marc

Cho Sing Kum


Marc,

We do have to care about DPI and such going forward. This DPI thing is not something that many has not gone into yet unless or until they need to or they or their customers' monitors break down and they have to get new monitors. Or their corporate customers start upgrading their monitors.

Nowadays, new monitors are only LCD or LED wide screen with native pixel resolution of easily 1920 x 1080, which happen to be Full HD resolution and common for 22, 23 inch wide screen LCD/LED panels. My son is using a 23" LED for his computer and XBox 360 and he loves it.

What is the advantage of such high resolution? All that are on the screen are sharper and clearer.

I am still using my 4X3 17" native 1280 x 1024 LCD screen but I can see the quality is starting to fade after few years of use.

What has this resolution to do with DPI stuff? Why do we as programmers have to know about this DPI stuff?

I took screen shots (attached below) of my Win7 Personalize - Display - Change display settings window to show how resolution come into play. You will of course already aware of this. I am trying to connect the dots to DPI.

There are two example windows in the settings. One the left is the Start menu. On the right is a program window. Notice that these windows are "big" in the 800x600 settings and get smaller as we move to 1280x1024.

At currently available Full HD 1920x1080 resolution, they will start look like postage stamps on an envelop! So, we will have to make then bigger, otherwise they will be too small to be readable/usable.

How to make them bigger? This is where the dots connect to DPI-awareness in program codes.


José Roca

Quote from: Marc van Cauwenberghe on January 30, 2012, 01:55:59 PM
Jose,
that is not fair  :(

I know my understanding of English/American is not that great because I got into a nasty discussion with the mythy BOB one time.
I still do not understand what I said wrong.
Therefore, is there a reasonable solution among your suggestions or are you giving me in some kind of message that I should learn this.
'Buy a magnifier', 'write a console application' is not what I see as a solution. The rest I do not have a clue what you mean.

Regards,
Marc


Well, English is also not my mother language. I was trying to show that the alternatives are not good or even absurd, so the only right one, in my opinion, is to learn as much as you can about High DPI. Otherwise, you will be walking in the dark.

Marc van Cauwenberghe

OK,
I may have over reacted. Sorry Jose.
Still think the tool you are using to make programs should
cover this without me having to worry about it.

Regards,
Marc

Paul Squires

Just an update: I have read the info provided by the MSDN link Jose provided. I have some work to so with FireFly to get the high dpi working. One area that I didn't realize I needed a lot of work was with font handling. Of all the changes, that will probably be the toughest for FireFly because a lot of stuff is custom drawn, etc.
Paul Squires
PlanetSquires Software

Eddy Van Esch

Eddy

Eddy Van Esch

Paul,
I realise solving this HIgh DPI awareness issue is not the most pleasant or exciting of jobs.
Just wanted to let you know how much I appreciate your perseverance in this and its great that you keep us up to date ( http://www.planetsquires.com/protect/forum/index.php?topic=3054.new#new ).
Thanks!

Kind regards
Eddy
Eddy

David Warner

Hi Paul,

I'd also like to chime in and say that your efforts are greatly appreciated here as well.
Both you and Jose are truly inspirational!

All the Best,

David

José Roca

Another thing to consider is the height of dialogs and other GUI elements such toolwindows. Because there are so many kind of monitors today, some are wide but no proportionally as high as other monitors, so one has to take into account the height, not hard code a value for it. Otherwise, buttons like "Ok" and "Cancel", usually located at the bottom of the dialog, risk to go outisde the visible part, and can't be seen and clicked. This has happened to me even with dialogs of Windows 7 itself.