WinStudio
Sets or returns a string that is the caption of the form or the label of the component.
object.Caption
Part |
Description |
object | Required. A reference to a form or form component object. |
object.Caption = "string"
Part |
Description |
object | Required. A reference to a form or form component object. |
string | Required. The caption of the form or the label of the component. |
In the Get syntax, the return value is the string being used as the caption or label.
Sub Main() Dim myCaption As String myCaption = ThisForm.Caption Application.ShowMessage("The current caption for this form is " & myCaption & ".") ThisForm.Caption = "My Own Form" myCaption = ThisForm.Caption Application.ShowMessage("The new caption for this form is " & myCaption & ".") End Sub