Feng26

Hi,

We have a Win form app written in VB.Net. One of the issues we have now is that the size/proportion of the win controls differ from workstation to workstation and that is NOT because of the windows resolution! (all the workstations have the same 1024x768 resolution).

As result of this, about 70 percent of our workstations display the controls the way we want, but the rest 30 percent display smaller forms relative to the available spaces on the window. This makes some of our controls not functioning correctly. One example would be that we have a one-charactor field which works fine on those 70 percent workstations. But on those 30 percent machines, it becomes too small to hold the charactor typed in and therefore it always appear to be blank - even if there is a charactor in it!

I tried everthing I can to track this down but am still out of luck so far. Like I said, it is not the resolution, not the widnow's font, not the operting system. What else could this be

If anyone could shed some light on this one, it would be highly appreciated!

Thanks in advance!

Feng



Re: Windows Forms General At runtime, what else controls windows controls' size/proportion besides windows' resolution?

nobugz

Check the video adapter's DPI setting. Control Panel + Display, Settings tab, Advanced. Try setting the form's AutoScaleMode to None.





Re: Windows Forms General At runtime, what else controls windows controls' size/proportion besides windows' resolution?

Feng26

Hi nobugz,

Thanks for your reply! I went in Control Panel / Display / Settings / Advanced but I can't seem to find where I can set form's AutoScaleMode. Could you please help me on this

Thanks again!

Feng





Re: Windows Forms General At runtime, what else controls windows controls' size/proportion besides windows' resolution?

nobugz

AutoScaleMode is a .NET 2.0 property of the Form class. The Control Panel hoopla was just to check the DPI setting.





Re: Windows Forms General At runtime, what else controls windows controls' size/proportion besides windows' resolution?

Feng26

Hi nobugz,

Well, our problem is that the same code behavies differently on different machines. So it doesn't seem like anything in the code is the issue (meanwhile, I did checked the forms and the AutoScaleMode is turned off). But as far as the DPI goes, could you be more specific on what needs to be checked I think I checked everything on all the different tabs and windows but haven't seen anything that's alrming...

Thanks

Feng





Re: Windows Forms General At runtime, what else controls windows controls' size/proportion besides windows' resolution?

Karthik Krishnaswami

Try Graphics.DpiY and Graphics.DpiX