# Windows 7/8  versus windows 10

**URL:** <https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173>\
**Category:** Windows\
**Created:** [January 13, 2016, 10:45am UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173 "2016-01-13T10:45:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joost\_Rongen](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@Joost\_Rongen](https://forum.xojo.com/u/Joost_Rongen)\
**Post date:** [January 13, 2016, 10:45am UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/1 "2016-01-13T10:45:19Z")

</div>

When you do a clean installation of Windows 7 or 8, you will have set the system-font-size set to medium (125%) by default. Because of this I set the height of a TextField-control to 25, which is 22 by default.  
When you do a clean installation of Windows 10, or even an upgrade of the above mentioned Win7/8, you end up having the default system-fontsize set to 100%. This is ok to me, but I find my application not nice looking since my textfields should be set to height = 22 again.  
To have this generic solved, I think about having a containercontrol holding a label and a textfield inside which resizes / reposition automatically.

Beside this, the proportions of objects is completely different in Windows 10 so you have to reposition thing to keep everything nice looking.

Curious how other Windows developers deal with this.

---

<div class="post-metadata">

**Author:** ![Tomas\_J](https://forum.xojo.com/user_avatar/forum.xojo.com/tomas_j/32/311_2.png) [@Tomas\_J](https://forum.xojo.com/u/Tomas_J)\
**Post date:** [January 13, 2016, 11:30am UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/2 "2016-01-13T11:30:14Z")

</div>

Good morning Joost,

well in enabling HiDPI

```auto
Soft Declare Function SetProcessDPIAware Lib "user32" () As Boolean
```

and using fixed sizes and letting some extra space left so that at least 100% and 125% both work fine. Everything beyond this? Well I do not have any customer using 150%… and I hope I won’t get one 😉

And until Xojo does not support HiDPI through the framework (e.g. in toolbars) you have to switch to 3rd Party components.

Here are some Screenies:

100%  
 ![](https://dl.dropboxusercontent.com/u/30535865/xojo/100.jpg)

125%  
 ![](https://dl.dropboxusercontent.com/u/30535865/xojo/125.jpg)

150%  
 ![](https://dl.dropboxusercontent.com/u/30535865/xojo/150.jpg)

---

<div class="post-metadata">

**Author:** ![Alain\_Bailleul](https://forum.xojo.com/user_avatar/forum.xojo.com/alain_bailleul/32/1370_2.png) [@Alain\_Bailleul](https://forum.xojo.com/u/Alain_Bailleul)\
**Post date:** [January 13, 2016, 11:52am UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/3 "2016-01-13T11:52:49Z")

</div>

> [@](#):
>
> Well I do not have any customer using 150%

I’m afraid 200% is very common on laptops with 4K screens

---

<div class="post-metadata">

**Author:** ![Tomas\_J](https://forum.xojo.com/user_avatar/forum.xojo.com/tomas_j/32/311_2.png) [@Tomas\_J](https://forum.xojo.com/u/Tomas_J)\
**Post date:** [January 13, 2016, 12:05pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/4 "2016-01-13T12:05:30Z")

</div>

Oh dear… I hope Xojo will be faster than the market penetration of 4K laptops 😉

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [January 13, 2016, 12:20pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/5 "2016-01-13T12:20:48Z")

</div>

RubberViews manages scaled display as well.

---

<div class="post-metadata">

**Author:** ![Tomas\_J](https://forum.xojo.com/user_avatar/forum.xojo.com/tomas_j/32/311_2.png) [@Tomas\_J](https://forum.xojo.com/u/Tomas_J)\
**Post date:** [January 13, 2016, 12:27pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/6 "2016-01-13T12:27:21Z")

</div>

of course, that’s correct that’s why I mentioned “3rd party components” 😉  
and this is the reason why I’ve bought your uncrypted license… I am following the strict policy not to use anything uncrypted in my software (esp. in software for my key “bread-and-butter” customers)

---

<div class="post-metadata">

**Author:** ![Joost\_Rongen](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@Joost\_Rongen](https://forum.xojo.com/u/Joost_Rongen)\
**Post date:** [January 13, 2016, 12:47pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/7 "2016-01-13T12:47:00Z")

</div>

Seems I have the uncrypted Rubberviews license twice (to keep Michel happy) and will try to implement it in a Windows project later. Features first … to keep my “bread-and-butter” customer happy too.

---

<div class="post-metadata">

**Author:** ![Joost\_Rongen](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@Joost\_Rongen](https://forum.xojo.com/u/Joost_Rongen)\
**Post date:** [January 13, 2016, 12:54pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/8 "2016-01-13T12:54:57Z")

</div>

@Tomas Jakobs - thanks for the DPI-aware tip.

> [@240844:@Tomas Jakobs](#):
>
> Soft Declare Function SetProcessDPIAware Lib “user32” () As Boolean

Problem solved.

---

<div class="post-metadata">

**Author:** ![Tomas\_J](https://forum.xojo.com/user_avatar/forum.xojo.com/tomas_j/32/311_2.png) [@Tomas\_J](https://forum.xojo.com/u/Tomas_J)\
**Post date:** [January 13, 2016, 1:26pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/9 "2016-01-13T13:26:40Z")

</div>

one last thing Joost… if you’re using any canvas in your HiDPI’ed Apps, dont forget to check scaling factor … this snipped is valid for Windows only, you have to try… catch and set pragmas if used multiplatform.

```auto
function ScalingFactor as Single

    Try
      
      Soft Declare Function GetDC Lib "user32" (hWnd As Ptr) As Ptr
      Soft Declare Function GetDeviceCaps Lib "gdi32" (hdc As Ptr, nIndex As Integer) As Integer
      Soft Declare Sub ReleaseDC Lib "user32" (hWnd As Ptr, hdc As Ptr)
      
      Const LOGPIXELSX = 88
      Const LOGPIXELSY = 90
      
      Dim hdc As Ptr = GetDC(Nil)
      Dim dpiX As Integer = GetDeviceCaps(hdc, LOGPIXELSX)
      Dim dpiY As Integer = GetDeviceCaps(hdc, LOGPIXELSY)
      ReleaseDC(Nil, hdc)
      
      Dim scaleFactorX As Double = dpiX / 96
      Dim scaleFactorY As Double = dpiY / 96
      
      Return scaleFactorX
      
    Catch
      
      Return 1
      
    Finally
      
    end Try
    
end function

```

and this should stay in the .Paint Event of your canvas

```auto
  If ScalingFactor > 1 Then
     g.DrawPicture(HiresImage, 0, 0, g.Width, g.Height, 0, 0, HiresImage.Width, HiresImage.Height)
  Else
     g.DrawPicture(NormalImage, 0, 0)
  End If

```

and of course this should be revalidated/ rechecked if the window is moved in multi-display enviroments (PC with one HiDPI display, one 2nd non-HiDPI display)

---

<div class="post-metadata">

**Author:** ![Joost\_Rongen](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@Joost\_Rongen](https://forum.xojo.com/u/Joost_Rongen)\
**Post date:** [January 13, 2016, 2:43pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/10 "2016-01-13T14:43:05Z")

</div>

Thanks a lot Tomas.  
I do use CANVAS in my application many times and was just looking for this.  
This should has been a part of the framework for RAD shouldn’t it ?

---

<div class="post-metadata">

**Author:** ![Norman\_P](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/858c86/32.png) [@Norman\_P](https://forum.xojo.com/u/Norman_P)\
**Post date:** [January 13, 2016, 2:47pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/11 "2016-01-13T14:47:29Z")

</div>

[http://blog.xojo.com/o-retina-retina-wherefore-art-thou-retina](http://blog.xojo.com/o-retina-retina-wherefore-art-thou-retina)

---

<div class="post-metadata">

**Author:** ![Tomas\_J](https://forum.xojo.com/user_avatar/forum.xojo.com/tomas_j/32/311_2.png) [@Tomas\_J](https://forum.xojo.com/u/Tomas_J)\
**Post date:** [January 13, 2016, 2:49pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/12 "2016-01-13T14:49:49Z")

</div>

…you owe me a beer in Koblenz Joost 😉 Are you coming?

---

<div class="post-metadata">

**Author:** ![Joost\_Rongen](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@Joost\_Rongen](https://forum.xojo.com/u/Joost_Rongen)\
**Post date:** [January 13, 2016, 2:53pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/13 "2016-01-13T14:53:02Z")

</div>

> [@240900:@Tomas Jakobs](#):
>
> …you owe me a beer in Koblenz Joost 😉 Are you coming?

Of course I will be comming !

---

<div class="post-metadata">

**Author:** ![Tomas\_J](https://forum.xojo.com/user_avatar/forum.xojo.com/tomas_j/32/311_2.png) [@Tomas\_J](https://forum.xojo.com/u/Tomas_J)\
**Post date:** [January 13, 2016, 2:53pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/14 "2016-01-13T14:53:40Z")

</div>

Aaaa I am getting thirsty now 😉

---

<div class="post-metadata">

**Author:** ![Joost\_Rongen](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@Joost\_Rongen](https://forum.xojo.com/u/Joost_Rongen)\
**Post date:** [January 13, 2016, 2:56pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/15 "2016-01-13T14:56:24Z")

</div>

> [@240899:@Norman Palardy](#):
>
> [http://blog.xojo.com/o-retina-retina-wherefore-art-thou-retina](http://blog.xojo.com/o-retina-retina-wherefore-art-thou-retina)

". . . . this feature along with a Retina/HiDPI-enabled Xojo IDE will come in 2016r1. " Thank you !

---

<div class="post-metadata">

**Author:** ![Norman\_P](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/858c86/32.png) [@Norman\_P](https://forum.xojo.com/u/Norman_P)\
**Post date:** [January 13, 2016, 3:05pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/16 "2016-01-13T15:05:04Z")

</div>

Since you’re both on the Beta I’m surprised you were NOT aware of this blog post - we did post this on the beta list

See you in Koblenz  
Beer sounds good

---

<div class="post-metadata">

**Author:** ![Tomas\_J](https://forum.xojo.com/user_avatar/forum.xojo.com/tomas_j/32/311_2.png) [@Tomas\_J](https://forum.xojo.com/u/Tomas_J)\
**Post date:** [January 13, 2016, 3:16pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/17 "2016-01-13T15:16:09Z")

</div>

> [@240911:@Norman Palardy](#):
>
> Since you’re both on the Beta I’m surprised you were NOT aware of this blog post - we did post this on the beta list

Pssst Norm, I just wanted to grab my free beer 😉  
I was aware of this blog post but you know… it’s ready when it’s finished… 😉

---

<div class="post-metadata">

**Author:** ![Norman\_P](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/858c86/32.png) [@Norman\_P](https://forum.xojo.com/u/Norman_P)\
**Post date:** [January 13, 2016, 3:48pm UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/18 "2016-01-13T15:48:03Z")

</div>

Huh - free beer  
I like it !

---

<div class="post-metadata">

**Author:** ![Mike\_D](https://forum.xojo.com/user_avatar/forum.xojo.com/mike_d/32/266_2.png) [@Mike\_D](https://forum.xojo.com/u/Mike_D)\
**Post date:** [January 16, 2016, 1:15am UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/19 "2016-01-16T01:15:23Z")

</div>

As I understand it, HiDPI support

- does one thing in Windows 7
- was changed in Windows 8
- was changed again in Windows 8.1
- was finally done “right” in Windows 10 (which means, about as good as Mac OS was 4 years ago)

So if you are writing apps, there is a serious motivation to just support Windows 10 and be done with it. Other options lead to madness.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [January 16, 2016, 1:25am UTC](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173/20 "2016-01-16T01:25:52Z")

</div>

I trust Xojo to support correctly Windows 10.

Microsoft itself is stopping support for Windows 7 SP1 [http://www.zdnet.com/article/windows-7-support-what-happens-on-january-13-2015/](http://www.zdnet.com/article/windows-7-support-what-happens-on-january-13-2015/) so I would not find it shocking to support only Win 10.

[Next page](https://forum.xojo.com/t/windows-7-8-versus-windows-10/29173.md?page=2)
