This documentation is archived and is not being maintained.

Form Positioning Changes in Visual Basic .NET

In Visual Basic 6.0, the initial screen location for a form could be set at design time using the Form Layout window or by setting the Left and Top properties in the Properties window. The Left and Top properties could also be set programmatically.

In Visual Basic .NET, the initial screen location is set at design time by setting the Location property, or programmatically by setting the Location property to a Point object.

In addition, Visual Basic 6.0 supported a StartUpPosition property that could be used to allow Windows to automatically set a location (for example, centered on the screen). The default setting was Manual, meaning that the Left and Top properties took precedence.

In Visual Basic .NET, the StartPosition property performs the same function. The default setting is now WindowsDefaultLocation, meaning that the Location property is ignored.

See Also

Setting the Screen Location of Windows Forms