473,408 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 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 3121
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John | last post by:
I'd like to write a programme that runs on a PC with two monitors. The application would be used in a shop, with one monitor for shop assistant and the other for the customer. The two must show...
0
by: dvestal | last post by:
I have a large form, with several hundred controls. When I open it in the designer, the designer resizes the form, but does not adjust the size of anchored controls in containers, thus corrupting...
1
by: Nilam2477 | last post by:
I have wizard kind of Windows Application with Forms having Prev & Next buttons. Currently i have set the Location for all the Forms on Form_Load() method using this.Location = new Point(100, 100); ...
1
by: euroluxantiques | last post by:
Hi All, Using VB.Net with SQL Server. I have a form that I create a number of Picture Boxes on dynamically, based on a stored procedure that retrieves a listing of images available for a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.