O'Reilly logo

Windows Forms Programming in C# by Chris Sells

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Form Size and Location

During its lifetime, the form is likely to take up space at some location. The initial location for the form is governed by the StartPosition property, which can have one of several values from the FormStartPosition enumeration:

enum FormStartPosition {
  CenterParent,
  CenterScreen,
  Manual,
  WindowsDefaultBounds,
  WindowsDefaultLocation, //  default
}

These values have the following behavior:

  • WindowsDefaultLocation. The form's starting position will be determined by Windows, which will pick a location staggered from the upper-left corner of the screen toward the lower right in an attempt to make sure that new windows neither cover each other nor fall off the screen. The form will be shown with whatever the Size property was ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required