Label Control and Autosize Property Example
◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
' This example shows how the AutoSize property can be used with a label
' control.
' 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 two label
' controls
' 3. Set the form's BackColor property to 1 (Blue)
' 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 ()
Label1.Caption = "This is an autosize test"
Label1.AutoSize = 1
Label2.Caption = "This is an autosize test"
Label2.AutoSize = 0
END SUB