High DPI and WebBrowser control

F

filipfracz

Hi,

I'm using a WebBrowser control on my Form. On my dev machine everything
looks nice and neat, but when I load it up on customer's box the
WebBrowser fonts are really small (customer has high DPI settings).
What's strange is that the regular Internet Explorer does properly
scale to the higher DPI.

Does anyone have any ideas how to solve this one?

Any help greatly appreciated.

- Filip.
 
K

Ken Halter

Hi,

I'm using a WebBrowser control on my Form. On my dev machine everything
looks nice and neat, but when I load it up on customer's box the
WebBrowser fonts are really small (customer has high DPI settings).
What's strange is that the regular Internet Explorer does properly
scale to the higher DPI.

Does anyone have any ideas how to solve this one?

Any help greatly appreciated.

- Filip.

Well.. since no one has answered, I'll at least try to give a starting
point...

In VB6, there's a Screen.TwipsPerPixelX and Screen.TwipsPerPixelY property
you can use to detect DPI settings. There must be something similar in
dotNet. If not, you might want to take a shot at converting this VB6 based
sample that uses the windows API to get to the information.

API to get Twips per pixel?
http://groups.google.com/group/micr...c27?hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8&rnum=7

Thing is, 96 DPI (Small Fonts) gives 15 twips per pixel while 120 DPI (Large
Fonts) gives 12 twips per pixel. That means the entire coordinate system
changes... which basically means all controls on the form are 125% larger
than "normal". This problem is ancient and we have the ATI video card
manufacturer to blame.

Tell the 'Large Font' users to read the following....

Large Fonts Suck
http://www.divsoft.com/lfs/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top