InsideHeight, InsideWidth Properties Example
The following example uses the InsideHeight and InsideWidth properties to resize a CommandButton. The user clicks the CommandButton to resize it.
Note InsideHeight and InsideWidth are read-only properties.
To use this example, copy this sample code to the Script Editor of a form. To run the code you need to open the form so the Open event will activate. Make sure that the form contains:
Dim Resize
Sub Item_Open()
Set CommandButton1 = Item.GetInspector.ModifiedFormPages("P.2").Controls("CommandButton1")
Resize = 0.75
CommandButton1.Caption = "Resize Button"
End Sub
Sub CommandButton1_Click()
Set Form = Item.GetInspector.ModifiedFormPages("P.2")
Set CommandButton1 = Item.GetInspector.ModifiedFormPages("P.2").Controls("CommandButton1")
CommandButton1.Move 10, 10, Form.InsideWidth * Resize, Form.InsideHeight * Resize
CommandButton1.Caption = "Button resized using InsideHeight and InsideWidth!"
End Sub