Object Model Reference : Classes : A : Application : Properties : Application.EventsEnabled |
Property EventsEnabled As Boolean
Member of Application
The EventsEnabled property returns or specifies a value indicating the enabled status of an event in CorelDRAW. An event is enabled if it is ready and able to execute in the application. If an event is enabled, its EventsEnabled status is True. If the event is disabled, the status is set to False. Events can be disabled to temporarily improve performance when performing routine operations
The following VBA example disables events before creating a second ellipse.
Sub EnabledEvents() |
Dim state As Boolean |
ActiveLayer.CreateEllipse2 0, 0, 5 |
'GlobalDocument_ShapeCreated event will be generated here. |
state = EventsEnabled 'Remember the flag state. |
EventsEnabled = False 'Disable events. |
ActiveLayer.CreateEllipse2 3, 3, 5 |
' This event wil not be generated. |
EventsEnabled = state 'Restore event state. |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.