Resize Event Example
◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
' This example automatically resizes a text box to fill the form whenever
' the form is resized.
' To try this example:
' 1. Choose New Project from the File menu
' 2. Choose New Form from the File menu to create a form with a text box
' 3. Set text box properties:
' • MultiLine = True
' • ScrollBars = 3 (Both)
' • BorderStyle = 0 (None)
' 4. Press Alt+F4 to return to the programming environment
' 5. Copy the code example below to the form module
' 6. Press F5 to run the example
SUB Form_Load ()
Text1.Text = "" ' Clear text
END SUB
SUB Form_Resize ()
Text1.Move 0, 0, ScaleWidth, ScaleHeight
END SUB