Vista border sizes in form design vs application

  • Thread starter Thread starter Dean Slindee
  • Start date Start date
D

Dean Slindee

In VisualStudio2005, using Vista OS: in the form design window a form's
border width appears to not have changed from using WindowsXP or Windows
Server 2003 OS's. However, when the application is launched (in Vista),
each form's border width has doubled in size.

Is there a way to control the form border width? I am painting forms within
forms, and the extra large border width is usurping more form real estate in
Vista than in previous OS's.

Thanks,
Dean S
 
Dean said:
In VisualStudio2005, using Vista OS: in the form design window a form's
border width appears to not have changed from using WindowsXP or Windows
Server 2003 OS's. However, when the application is launched (in Vista),
each form's border width has doubled in size.

As VB Developers, we've /never/ had control over the size of border that
our users /choose/ to have around their Windows.

That's why all sizing code should be based around [form].ClientSize (the
bit /inside/ the borders, whatever size they happen to be) and
[form].Size, which is the whole Window; borders, menus, warts and all.
Is there a way to control the form border width?

Short answer: No.

It's /chosen/ by the User and unless you go into some /really/ nasty
subclassing (which, it has to be said, /is/ easier than it /used/ to be)
you can't (and, possibly, shouldn't) do anything about it.

Regards,
Phill W.
 
Your points are well appreciated.

Nevertheless, after a little code experimentation, switching from specifying
Windows.Forms.FormBorderStyle.SizeableToolWindow to
Windows.Forms.FormBorderStyle.FixedToolWindow shrunk the width by about
2/3rds. All's well again.

Thanks,
Dean S
Phill W. said:
Dean said:
In VisualStudio2005, using Vista OS: in the form design window a form's
border width appears to not have changed from using WindowsXP or Windows
Server 2003 OS's. However, when the application is launched (in Vista),
each form's border width has doubled in size.

As VB Developers, we've /never/ had control over the size of border that
our users /choose/ to have around their Windows.

That's why all sizing code should be based around [form].ClientSize (the
bit /inside/ the borders, whatever size they happen to be) and
[form].Size, which is the whole Window; borders, menus, warts and all.
Is there a way to control the form border width?

Short answer: No.

It's /chosen/ by the User and unless you go into some /really/ nasty
subclassing (which, it has to be said, /is/ easier than it /used/ to be)
you can't (and, possibly, shouldn't) do anything about it.

Regards,
Phill W.
 
Back
Top