Set Event Processing statement - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Temporarily turns event processing on or off, to avoid unnecessary screen updates. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Set Event Processing { On | Off } 

Description

The Set Event Processing statement lets you suspend, then resume, processing of system events.

If several successive statements modify a window, MapInfo Pro may redraw that window once for each MapBasic statement. Such multiple window redraws are undesirable because they make the user wait. To eliminate unnecessary window redraws, you can issue the statement:

Set Event Processing Off 

Then issue all statements that apply to window maintenance (for example, the Set Map statement), and then issue the statement:

Set Event Processing On

Every Set Event Processing Off statement should have a corresponding Set Event Processing On statement to restore event processing. In environments which perform cooperative multi-tasking, leaving event processing off can prevent other software applications from multi-tasking.

You also can suppress the redrawing of a Map window by issuing a Set Map...Redraw Off statement, which has an effect similar to the Set Event Processing Off statement. However, the Set Map statement only affects the redrawing of one Map window, while the Set Event Processing statement affects the redrawing of all MapInfo Pro windows.