WinStudio

Top Property

Applies To

Definition

Form objects – Sets or returns the measure in character units from the top of a form to the top of the WinStudio workspace. Read/write.

Component objects – Returns the measure in character units from the top of a component to the top of a form. Read-only.

Get Syntax

object.Top

  Part

  Description

object Required. A reference to a form or component object.

Set Syntax

object.Top = double

  Part

  Description

object Required. A reference to a form or component object.
double Required. Form objects only. An expression that evaluates to a Double and sets the distance in character units from the top edge of the form to the top edge of the WinStudio workspace.

Remarks

The return value is a Double that indicates the distance in character units from:

Examples

Form Example
Sub Main()
    Application.ShowMessage("The top side of this form is currently " & _
       ThisForm.Top & " units from the top.")
    ThisForm.Top = 20
    Application.ShowMessage("The top side of this form has been moved to " & _
       ThisForm.Top & " units from the top.")
End Sub
Component Example
Sub Main()
   Application.ShowMessage("The secondary collection grid is " _
      & ThisForm.Components("grid1").Top & _
      " character units from the top of the form.")
End Sub

Related Topics

CharHeight Property

CharWidth Property

Height Property

Left Property

Resize Method

Width Property