In a single-monitor context it's reasonably simple:
myForm.Width = Screen.PrimaryScreen.Bounds.Width;
or
myForm.Width = Screen.PrimaryScreen.WorkingArea.Width;
(the above widths can be different, you need to decide which one to use).
In a multi-monitor contet it's more complex, you'll need to define what your
requirements are. Should the width be the width spanning all monitors or a
single monitor? If it's a single monitor, what's the criteria for choosing
which monitor?
--
Browse
http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"sloan" wrote:
Probably an easy question but here goes:
A 2.0 winform.
How (on startup) should I properly make the width, the max of the user's
screen?