◄Example► ◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── ' This example changes the label alignment when you click the command button. ' 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: ' • Label ' • Command button ' 3. Press Alt+F4 to return to the programming environment ' 4. Copy the code example below to the form module ' 5. Press F5 to run the example SUB Command1_Click () SELECT CASE Label1.Alignment CASE 0 Label1.Alignment = 1 Command1.Caption = "Right" CASE 1 Label1.Alignment = 2 Command1.Caption = "Center" CASE ELSE Label1.Alignment = 0 Command1.Caption = "Left" END SELECT END SUB