Windows Develop Bookmark and Share   
 index > Windows Forms General > How to scale controls to 96 Dpi in 120 Dpi environment
 

How to scale controls to 96 Dpi in 120 Dpi environment

Hello all,

I'm stuck on a really serious issue. I need to scale any type of control (e.g. DataGridView) to 96 Dpi in a 120 DPI Windows environment. How can I do this. It would be even better if there is a way to have my whole application (C#) run in 96 DPI and ignore the 120 DPI Windows setting.
Is there a way to do this type of thing?

Please help me on this one, I'm writing this system for someone who runs the app in a 120 DPI environment. It's a desktop app. I see there's a SetProcessDpiAware function that one can use, but I've seen no practical example of how it is used. Could someone please help?

Thanks in advance
Nathanael
Nathanael2  Thursday, September 07, 2006 6:05 AM
Try setting the form's AutoScaleMode property to None.
nobugz  Thursday, December 07, 2006 1:04 PM

I have the EXACT SAME issue and am looking to find a way to resolve this. I am currently developing in VB6 and have thought perhaps I may have to resort to creating 2 different versions of EVERY single form in my project...one 96 DPI version, one 120 DPI version. As you can probably guess, this is an IMPOSSIBLE task. There has to be a better way!!!!! I'm curious to know how others have handled the issue with scaling apps across different environments. Please keep in mind we are not talking about screen resolution (i.e.: 1024x768 vs. 800x600), we are talking about screen font/control scaling of the entire Windows environment (96 DPI vs. 120 DPI). Very different, indeed! Please help!!

TeddyF.  Thursday, December 07, 2006 6:20 AM
Try setting the form's AutoScaleMode property to None.
nobugz  Thursday, December 07, 2006 1:04 PM
Thank you for the reply...but how about a solution for VB6?
TeddyF.  Thursday, December 07, 2006 7:06 PM
There isn't one.
nobugz  Thursday, December 07, 2006 7:30 PM

You can use google to search for other answers

Custom Search

More Threads

• ?? Right-Click on ListBox Item ??
• Taking Data and Posting Data to Excel
• Handling both mouse buttons being pressed
• AppUpdater Component Error Messages
• How does one test for the last node (or leaf) in a TreeView?
• MDI or not?
• Trigger a javasctipt function in a WebBrowser control?
• Converting Color Type
• Engineering model didn't port from VB4 to VB5. Need help.
• Difference between Sub Form_Load and Sub New