Application running on workstations with different screen resoluti

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a VB .Net Windows Form application that was developed on a workstation
with a screen resolution of 1280 x 1024, Normal DPI. After installing the
application on other workstations I have found that the form no longer fits
on the screen due to the display settings, form is now too large to fit on
the screen. I have tried messing around with the forms.autoscale property
and nothing seems to make a difference.

Can anyone enlighten me on how to handle resizing the form automatically?

Thank you.
 
Wishing I was skiing mom said:
I have a VB .Net Windows Form application that was developed on a
workstation
with a screen resolution of 1280 x 1024, Normal DPI. After installing the
application on other workstations I have found that the form no longer
fits
on the screen due to the display settings, form is now too large to fit on
the screen. I have tried messing around with the forms.autoscale property
and nothing seems to make a difference.

Can anyone enlighten me on how to handle resizing the form automatically?

Thank you.
Well, as far as the form size is concerned, you can either set the form to
show with the form's WindowSate set at Maximized, which will adapt to the
different screen resolutions, or you can set the form dimensions at run
time.
The method I use utilizes the WorkingArea:

// Set the form size to just a little smaller than the screen.

this.Width = SystemInformation.WorkingArea.Width - 20;
this.Height = SystemInformation.WorkingArea.Height - 20;
// Set the form location
this.Left = (SystemInformation.WorkingArea.Left + 10);
this.Top = (SystemInformation.WorkingArea.Top + 10);

Of course, this only resizes the form. You will have to re-arrange the
position of your controls if you want them visible at all resolutions. You
also have to ensure the form's StartPosition is set at Manual, otherwise it
will keep resetting your form.
HTH
Ron.
 
Back
Top