This function enables the internal event handler of Hollywood. This
means, that you do not have to call WaitEvent() any longer because
Hollywood will always check if there are any events that occurred.
Using the internal event handler is useful if you want to call some
functions when there is no input but also monitor user input, e.g.
if you are doing a slide show with some effects you cannot call
WaitEvent() every second but you still want that the user can quit
the show by pressing some button on your screen. Then it would be
wise to call
EnableEventHandler(). Once it is enabled, you can do
what you want but all events are still monitored.
Please note: Use this function only when you really need it. It has
major disadvantages compared to an input loop together with WaitEvent()
because you will never know when an event was raised and from where.
If Hollywood's event handler is enabled, events can be raised always.
It could even happen, that an event breaks commands that are still
busy, e.g. DisplayTransitionFX(). It is not a good idea to use
EnableEventHandler() in your projects because you will lose the control
of your application.
EnableEventHandler() is also very likely to
be removed from Hollywood in future versions. So you should stay on
the safe side, which means: Use an input loop with WaitEvent().
EnableEventHandler DisplayBGPic(1) Wait(200) DisplayBGPic(2) ... Label(ONBUTTONCLICK1) EndThe above code enables the event handler and then starts a slide show but the user will always be able to press a button although you do not call WaitEvent().