Misplacement of controls on one machine but not others

  • Thread starter Richard Lewis Haggard
  • Start date
R

Richard Lewis Haggard

I've got a problem with the way that some dialogs, er ah, I mean forms,
position their controls. On most machines, but not on my client's laptop,
all of the forms and their controls display in the expected fashion but on
my client's laptop, there are a couple of forms whose controls are placed as
though the height of the dialog was measured in smaller units than those
used to place its child controls. For example, one of the problem dialogs is
the proper width but its client area extends below the bottom of the
dialog's bottom border to such an extent that the OK and Cancel buttons are
not visible. This particular machine has some non-standard display
settings. The display is set at 1600 x 1200 and I suspect that the owner has
asserted larger than normal fonts but I do not have access to the machine
itself and don't know which display settings have been altered. I have a
desk top locally that supports 1600 x1200 and have gone through all of the
display properties that are concerned with font size that I can think of but
have not been able to duplicate the observed failures. In Dev Studio 6 days,
the dialog box coordinates are measured in font units. How are form
positions determined in .NET? How could the size of the form be out of sync
with the positions of its child controls?
 
P

Pete

I suspect you are correct. Ask them to set their Font size to "Normal" or
96 dpi and see what happens.
 
R

Richard Lewis Haggard

After much experimentation and research, I finally gave up trying to make
use of the built in design time features. No matter what I did, there was
always some configuration or another where the controls simply were not
being placed correctly when the design placement of the controls was
different than the run time. The standard examples of a simple text box or a
label and a control all work fine but once more complicated layouts were
generated or, worse, third party controls were included, things invariably
became unglued. To solve the issue, I intercepted the event that handles the
form's changing size and explicitly calculated where each control should be
given the actual client space available. This works flawlessly for me.
Thanks for the many helpful hints given by one and all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top