From: Webbiz on
On Fri, 12 Mar 2010 23:49:32 -0000, "Mike Williams"
<Mike(a)WhiskyAndCoke.com> wrote:

>
>"Webbiz" <nospam(a)noway.com> wrote in message
>news:qg5lp5d379m0majrv6eb4n0a3gko7vfq0e(a)4ax.com...
>
>> I did the test at 126 dpi with and without the check
>> in the box. The drawings and graphics appear to be
>> operating fine. They just got bigger.
>
>Yep. That's what's supposed to happen, and it's more or less automatic on
>small VB Forms without needing any repositioning code because in many
>respects VB is already dpi aware. The problems arise when you have a larger
>fixed size Form that cannot expand its client area to its full 120 dpi size
>on a 120 dpi machine because of a lack of screen real estate even though its
>contained controls will still fully expand their size and position (and also
>with user sizeable Forms of course) and when you are not positioning the
>various elements on your Form in code in accordance with the current size of
>its client area and the current size of the various elements. You are
>obviously already doing that, at least in the important areas, which is why
>your own Form is apparently okay at the various settings. It's always worth
>checking though and you'll be surprised at how many apps go wrong at 120 dpi
>or higher.
>
>> I'm puzzled as to what I could possibly do in my code
>> to make things not relative to each other when resizing
>> the DPI.
>
>It's not what you can do, but rather what you might fail to do. In your case
>you are obviously already doing the required things. There are still the
>Vista and Windows 7 special dpi scaling problems to account for though,
>which can cause problems with your Form display even when you are already
>doing all the right things in your code (the problems I mentioned that can
>occur when the user's machine is set to 120 dpi with no tick in the box
>against "Use Windows XP Style DPI Scaling". Those problems are due to the
>new Vista special scaling not actually working properly for certain things.
>I'm not sure whether they have fixed those problems in Windows 7 because I
>don't have a copy, but they are a problem in Vista and if they have not been
>fixed then they will be a problem in Windows 7 as well. In your own case it
>would appear that you are not using anything on your Form in a way that will
>show those problems (or that they have been fixed in Windows 7).
>
>A few different things are affected by the problem but I'll give you one
>specific example and you can try it out yourself. Suppose your development
>machine is running at the standard 96 dpi and you have a standard ListBox or
>a ComboBox on your Form which is using the standard MS Sans Serif font and
>in which you are displaying lots of items for the user to select from and
>suppose that you have set its size at design time so that it neatly displays
>all items without any of them being "cut off" at the right side, and with
>perhaps even a little bit of extra space "for comfort". If you run such a
>compiled exe on a machine running at the same 96 dpi settings then it will
>obviously work okay. If you then run it on a 120 dpi XP machine (or a 120
>dpi Vista machine where there /is/ a tick in the "Use Windows XP Style DPI
>Scaling" box) then it will still look okay, because the ListBox or ComboBox
>will expand to 1.25 times its original design time pixel size and the size
>of the font will expand by the same amount (or at least by a similar amount)
>and everything will still probably fit as before, with the items in the
>Combo still all being fully visible and not cut off at the right edge. The
>whole ComboBox and its contents will effectively be a larger copy of the
>original. However, if you run that compiled exe on a Vista 120 dpi machine
>where there is /no tick/ in the "Use Windows XP Style DPI Scaling" box then
>the ComboBox will still expand by the same amount as it did on the other 120
>dpi machine, but the font will expand by a much larger amount, looking
>obviously too big and usually resulting in many of the items being "cut off"
>at the right side. Similar things happen in some other controls, often
>resulting in text overflowing the width of a Label Control and in text in
>some other controls wrapping when it did not wrap before. This is not a
>problem if you instead use True Type fonts by the way, but then the special
>Vista scaling method makes the text look quite blurred and your customers
>will think they suddenly need glasses! As I mentioned earlier, there is a
>very easy way to fix those problems and that is to use a manifest in which
>you declare your app to be "dpi aware", which will prevent Vista from using
>its "special scaling" system and your app will then work just as well as it
>did on XP at 120 dpi.
>
>As I've mentioned, these are definitelty problems in Vista and I suspect
>they may also be problems in Windows 7 if MS hasn't got around to fixing
>them. It might be worth trying that little test on your own Window7 and
>Vista systems just to convince yourself that in such cases (in fact in all
>cases) it really is worth embedding a suitable manifest into your app.
>
>Mike
>
>
>


The simple solution is to pack Vista on the shelf along with the 286
computer, Microsoft Bob, Microsoft ME and the Mac Cube. <g>

Webbiz
From: Mike Williams on
"Webbiz" <nospam(a)noway.com> wrote in message
news:eoamp59prkdpskgfrjp27mtkaj2f7fuegv(a)4ax.com...

> The simple solution is to pack Vista on the shelf along
> with the 286 computer, Microsoft Bob, Microsoft ME
> and the Mac Cube. <g>

Well, I'm not so sure about that. A 286 computer can sometimes be quite
useful ;-)

Mike


From: Webbiz on
On Sat, 13 Mar 2010 07:12:16 -0000, "Mike Williams"
<Mike(a)WhiskyAndCoke.com> wrote:

>"Webbiz" <nospam(a)noway.com> wrote in message
>news:eoamp59prkdpskgfrjp27mtkaj2f7fuegv(a)4ax.com...
>
>> The simple solution is to pack Vista on the shelf along
>> with the 286 computer, Microsoft Bob, Microsoft ME
>> and the Mac Cube. <g>
>
>Well, I'm not so sure about that. A 286 computer can sometimes be quite
>useful ;-)
>
>Mike
>


Sure, if you need just a few more inches to reach a top shelf. <g>

Webbiz