Screen Updating and Refresh

When running large procedures, disabling screen updates in Maxsurf can reduce execution times. This can be done by setting the ScreenUpdating property to False at the start of the procedure, then returning it to True at the end.

    msApp.ScreenUpdating = False

    'To turn it off

 

    '--------------------

    'Procedure Code goes here

    '--------------------

   

    msApp.ScreenUpdating = True

    'and to turn it back on again

 

Other times, changes will be made in Maxsurf through the automation interface that won’t be updated on the screen. At the end of a procedure or a loop in a procedure the Refresh method can be given, to redraw the screen and update

    msApp.Refresh

 

This updates the screen to show the most current settings.