contents   index   previous   next



SElib.multiTask()

syntax:

SElib.multiTask(on)

where:

on - a boolean determining whether multitasking is on or off. Default is true.

 

return:

void.

 

description:

For Win16

 

Turns multitasking of programs on or off. Normally, multitasking is enabled and should be turned off only for very brief and critical sections of code. No messages are received by the current program or any other program while multitasking is off.

 

SElib.multiTask() is additive, meaning that if you call SElib.multiTask(false) twice, then you must call SElib.multiTask(true) twice before multitasking is resumed.

 

The example below empties the clipboard. Multitasking is turned off during this brief interval to ensure that no other program tries to open the clipboard while this program is accessing it.

 

see:

SElib.suspend()

 

example:

SElib.multiTask(false);

SElib.dynamicLink("USER", "OPENCLIPBOARD", SWORD16,

                   PASCAL, Screen.handle());

SElib.dynamicLink("USER", "EMPTYCLIPBOARD", SWORD16, PASCAL);

SElib.dynamicLink("USER", "CLOSECLIPBOARD", SWORD16, PASCAL);

SElib.multiTask(true);

 


SElib.peek()