Graphic bug - position of controls not consistent on another computer

  • Thread starter Thread starter Jc Morin
  • Start date Start date
J

Jc Morin

Hello,

I've release a small tools in .NET and out of 4000 users, I have 2 of them
that experience the same issue and I would like to know if anyone ever seen
that before.



- The background is a big image

- I use standard control (text box, label, button, checkbox) over the
background

- Positions are very important so that they fit right with the background.



For some weird reason, 2 of my client have everything un-aligned.

[View a print screen of the difference]

http://www.gwfreaks.com/bug.jpg



The right version has been submitted to me. On that seen it's not that bad
but all the rest of the application (with dozen of control misaligned) is
pretty unusable.



What can cause this?

- Theme? (One of my clients is on windows 2000 other on windows XP)

- Style?

- Plugging that cause control to be different?



Is there any know solution or issue that could help me.



Thanks a lot.
 
Jc Morin said:
For some weird reason, 2 of my client have everything un-aligned.

[View a print screen of the difference]

http://www.gwfreaks.com/bug.jpg



The right version has been submitted to me. On that seen it's not
that bad but all the rest of the application (with dozen of control
misaligned) is pretty unusable.



What can cause this?

- Theme? (One of my clients is on windows 2000 other on windows
XP)

- Style?

- Plugging that cause control to be different?

- Font size

Set the Form's Autoscale property = False


Armin
 
Looks like these 2 computers are using Large Fonts. This is causing your
child controls to move. You can test this by changing your Windows Settings
(under Display Properties -> Advanced).

You need to either do what Armin suggested (turn AutoScale = False) or
re-scale your image using the current screen DPI.

The first option is obviously the easiest but it will not play nice with the
user's preference (large fonts), what I do is this in the constructor on my
form:

AutoScaleDimensions = new System.Drawing.SizeF(96F,96F);
AutoScaleMode = AutoScaleMode.Dpi;

This assumes that the form is designed at 96 DPI (standard), the form will
re-size and move its child controls when running on a different DPI. If you
are drawing this image yourself make sure you strech it to the size of the
form.

Hoewer if only 2 out of 4000 are using large fonts its probably better just
to take Armin approach, it is a pain to test this because you have to reboot
every time you cange the windows settings.

--
Francisco Padron
www.chartfx.com


Armin Zingler said:
Jc Morin said:
For some weird reason, 2 of my client have everything un-aligned.

[View a print screen of the difference]

http://www.gwfreaks.com/bug.jpg



The right version has been submitted to me. On that seen it's not
that bad but all the rest of the application (with dozen of control
misaligned) is pretty unusable.



What can cause this?

- Theme? (One of my clients is on windows 2000 other on windows
XP) - Style?

- Plugging that cause control to be different?

- Font size

Set the Form's Autoscale property = False


Armin
 
Thanks, I'm 99% sure that you are right. I should have ask here first, I did
lots of search for nothing.

Thanks again Armin


Armin Zingler said:
Jc Morin said:
For some weird reason, 2 of my client have everything un-aligned.

[View a print screen of the difference]

http://www.gwfreaks.com/bug.jpg



The right version has been submitted to me. On that seen it's not
that bad but all the rest of the application (with dozen of control
misaligned) is pretty unusable.



What can cause this?

- Theme? (One of my clients is on windows 2000 other on windows
XP)

- Style?

- Plugging that cause control to be different?

- Font size

Set the Form's Autoscale property = False


Armin
 
Back
Top