System.Drawing.Graphics.DpiX always return 96

前端 未结 3 795
隐瞒了意图╮
隐瞒了意图╮ 2021-01-24 07:37

I have vb.net winform app that has AutoScaleMode = dpi AutoScale = false AutoSize = true

I\'ve signed off after changing DPI setting. I also tried restarting the machine

3条回答
  •  没有蜡笔的小新
    2021-01-24 07:53

    I ran into this problem and found that if you override the OnPaint(PaintEventArgs e) method of the form, and then get the Graphics object from the argument 'e' i.e. e.Graphics then the DpiX and DpiY value of this Graphics object is correct.

提交回复
热议问题