◄Example► ◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── ' This example uses the MOVE method to move a form around on the screen and ' the MSGBOX function to display information to the user. ' To try this example: ' 1. Choose New Project from the File menu ' 2. Choose New Form from the File menu to create a form ' 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 DECLARE SUB MoveDemo () SUB Form_Click () CALL MoveDemo END SUB SUB MoveDemo () Msg$ = "Choose OK to resize and move this form by " Msg$ = Msg$ + "changing the value of properties." MSGBOX Msg$ ' Display message In% = 10 ' Set in to 10 Width = 4 * In% ' Set width Height = 2 * In% ' Set height Left = 0 ' Set left to origin Top = 0 ' Set top to origin Msg$ = "Now choose OK to resize and move this form " Msg$ = Msg$ + "using the MOVE Method." MSGBOX Msg$ ' Display message Form1.MOVE SCREEN.Width - 2 * In%, SCREEN.Height - In%, 2 * In%, In% END SUB