Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Troubles with a DPI Aware application

Troubles with a DPI Aware application

Scheduled Pinned Locked Moved C#
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Antonino Porcino
    wrote on last edited by
    #1

    I have a WinForm application that occasionally creates a range of Controls at runtime (buttons, labels and so on) always setting precise sizes and fonts for them. Everything runs finely in normal DPI (96) but if I switch to high DPI (125%) all the controls are wrongly resized showing clipped text. I tried using the DPI Aware function, both in manifest and DLL, but with no success (apparently nothing changes). All want to do is prevent Windows from resizing the controls, I just want to disable this whole DPI resizing thing. Is that possible?

    C 1 Reply Last reply
    0
    • A Antonino Porcino

      I have a WinForm application that occasionally creates a range of Controls at runtime (buttons, labels and so on) always setting precise sizes and fonts for them. Everything runs finely in normal DPI (96) but if I switch to high DPI (125%) all the controls are wrongly resized showing clipped text. I tried using the DPI Aware function, both in manifest and DLL, but with no success (apparently nothing changes). All want to do is prevent Windows from resizing the controls, I just want to disable this whole DPI resizing thing. Is that possible?

      C Offline
      C Offline
      Ciumac Sergiu
      wrote on last edited by
      #2

      Try to set AutoScaleMode of the form to NONE. Not sure if it helps, but there is a good article related to scaling http://en.csharp-online.net/Layout[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups