NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Positioning Controls on Win Forms

You can use the Location property or the Left and Top properties to position a control on a form at run time.

To position a control programmatically

  1. Set the Location property of the control to a Point.
    [Visual Basic]
    Button1.Location = New Point (100, 100)
    [C#]
    Button1.Location = new Point (100,100);
  2. Change the X or Y coordinate of the control's location using the Left and Top properties.
    [Visual Basic]
    Button1.Left = 300
    Button1.Top = 300
    [C#]
    Button1.Left = 300;
    Button1.Top = 300;

To increment a control's location programmatically

See Also

Control Manipulation on Win Forms | Controls by Category | Adding Controls to Win Forms | Anchoring Controls on Win Forms | Docking Controls on Win Forms | Layering Objects on Win Forms | Resizing Controls on Win Forms | Setting the Tab Order on Win Forms | Working with Individual Controls | Controls You can Use on Win Forms | Win Form Controls by Function