471,599 Members | 920 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,599 software developers and data experts.

Control Location in Windows form and DPI settings on the monitor

Hi,

I am trying to move controls around in a form based on user selection on a
combo-box. So i hard coded the location and distances of where and how much
to move controls by in my program. Everything works fine on my machine. But
when i run my program on another machine which has a diferent DPI setting on
the monitor(mine was 120 and the other machine was 96) the control position
and the distances were bad. I am assuming that it because when i move a
control down by a given distance (100) to a certain location, the distance
evaluates to be a different location on the other computer with different DPI
setting. I know some people used to have similar problems in VB6 but i
thought microsoft fixed it in .NET. How do i make my form appear uniform on
both computers with different DPI settings? I would appreciate any help or
suggestions in this regard.

Thank You,
Vish
Feb 20 '06 #1
2 3016
Vish,

By default the DPI is 96. I guess the problem you having is because the form
has its AutoScale proeprty set to true. This makes the form to to adjust
based on the used font. The size of the font letters are affected by the DPI
settings so I guees that's why you get different result. Usually this is not
a problem, but mybe in your case it is.

Try to turn off this property.
--

Stoitcho Goutsev (100)

"Vish" <Vi**@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
Hi,

I am trying to move controls around in a form based on user selection on a
combo-box. So i hard coded the location and distances of where and how
much
to move controls by in my program. Everything works fine on my machine.
But
when i run my program on another machine which has a diferent DPI setting
on
the monitor(mine was 120 and the other machine was 96) the control
position
and the distances were bad. I am assuming that it because when i move a
control down by a given distance (100) to a certain location, the distance
evaluates to be a different location on the other computer with different
DPI
setting. I know some people used to have similar problems in VB6 but i
thought microsoft fixed it in .NET. How do i make my form appear uniform
on
both computers with different DPI settings? I would appreciate any help or
suggestions in this regard.

Thank You,
Vish

Feb 20 '06 #2
Hi Goutsev,

I appreciate your suggestions. That was not the problem in my case. I tried
setting the AutoScale property of the form to "None" but that did not fix the
problem. Any other ideas to try and fix the problem would be wonderful?

-Vish
"Stoitcho Goutsev (100)" wrote:
Vish,

By default the DPI is 96. I guess the problem you having is because the form
has its AutoScale proeprty set to true. This makes the form to to adjust
based on the used font. The size of the font letters are affected by the DPI
settings so I guees that's why you get different result. Usually this is not
a problem, but mybe in your case it is.

Try to turn off this property.
--

Stoitcho Goutsev (100)

"Vish" <Vi**@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
Hi,

I am trying to move controls around in a form based on user selection on a
combo-box. So i hard coded the location and distances of where and how
much
to move controls by in my program. Everything works fine on my machine.
But
when i run my program on another machine which has a diferent DPI setting
on
the monitor(mine was 120 and the other machine was 96) the control
position
and the distances were bad. I am assuming that it because when i move a
control down by a given distance (100) to a certain location, the distance
evaluates to be a different location on the other computer with different
DPI
setting. I know some people used to have similar problems in VB6 but i
thought microsoft fixed it in .NET. How do i make my form appear uniform
on
both computers with different DPI settings? I would appreciate any help or
suggestions in this regard.

Thank You,
Vish


Mar 6 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.