Results 1 to 4 of 4

Thread: win7 and win10 about dpi

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2016
    Posts
    485

    win7 and win10 about dpi

    I have two computers. one is win7 dpi 96 100%, the other is win10 dpi 120 125%!

    now test

    first in win7, open a new project. set a picture control in the form, set picture control autosize is false. load a picture. save the project. then copy this project to win10. and open the project ;you will find the control will not scale to DPI.

    next in win10, open a new project, do the same, and copy this project to win7. will find AutoSize property is True or false, the control will scale to DPI.

  2. #2
    Frenzied Member
    Join Date
    Dec 2014
    Posts
    1,282

    Re: win7 and win10 about dpi

    yeah, dpi is well known an issue, not just between windows version but monitor resolutions as well.
    I have this problem between 2 computer using the same version of windows 7 that both uses the same DPI, but the monitor resolution is different.
    the controls are all wrong and each time I fix them in one computer it will make them wrong in the other.

    theres tons of thread about DPI, how to fix it, manifests etc.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2016
    Posts
    485

    Re: win7 and win10 about dpi

    https://www.vbforums.com/showthread....are&highlight=
    I read this thread, but It was different from the content in this post

    I used manifests, but no changes.
    so I think may be developing on win 10 can be avoided this dpi problem.
    in win 10. the controls will scale to DPI.
    Last edited by xxdoc123; Nov 23rd, 2020 at 10:51 PM.

  4. #4
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,774

    Re: win7 and win10 about dpi

    The problem here is that if you develop in one DPI setting and after that you load the same project in another DPI setting, VB scales automatically all the design time properties values (regarding size and position) to the new setting.

    Then, in your case, the picture that you load into the PictureBox is an image in pixels, and while VB scaled the PictureBox control (the rectangle), it did not scale the image inside the PictureBox, that remains in pixels.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width