PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Summary table about the operating mode of signals
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Modifies the status of an event.
Versions 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 17 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 17
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Versions 19 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 19
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Create an event
EventCreate("Let's go", eventManual, eventClose)
// Run a first thread
ThreadExecute("Thread1", threadNormal, "Thread_First")
// Locks the current thread until the signal is obtained
ThreadWaitSignal()

// Run a second thread
ThreadExecute("Thread2", threadNormal, "Thread_Second")
// Locks the current thread until the signal is obtained
ThreadWaitSignal()

// Modifies the event to run the threads
EventChange("Let's go", eventOpen)
//----------------------------------------------
PROCÉDURE Thread_First()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
EventWait("Let's go")
Trace(dbgInfo(dbgProcess) + " - Signal received")
//--------------------------------------------
PROCÉDURE Thread_Second()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
EventWait("Let's go")
Trace(dbgInfo(dbgProcess) + " - Signal received")
Syntax
EventChange(<Event name> [, <New status>])
<Event name>: Character string (with quotes)
Name of the event to modify. If this event does not exist, it is automatically created with the default options (automatic mode) and in the specified status.
<New status>: Optional constant
Status of the signal:
eventOpen
(Default value)
Opens the signal. If threads are waiting for the signal, they are automatically unlocked.
Versions 20 and later
This constant is equivalent to EventOpen.
New in version 20
This constant is equivalent to EventOpen.
This constant is equivalent to EventOpen.
eventCloseCloses the signal.
Versions 20 and later
This constant is equivalent to EventClose.
New in version 20
This constant is equivalent to EventClose.
This constant is equivalent to EventClose.
eventOpenAndCloseOpens the signal, unlocks all the pending threads and closes the signal.
This constant is not recommended. It is kept for backward compatibility.
Remarks

Summary table about the operating mode of signals

Value of EventChangeAutomatic signal (by default)Manual signal
eventOpenA single thread is processed by the signal.
The signal is automatically closed once the thread is processed.
Pending threads: If there is no pending thread, the signal remains opened until the next thread, then it is closed.
New threads: The new threads are added to the pending queue.
The event is opened.
Pending threads: All the pending threads are processed.
New threads: If other threads arrive while the signal is still opened, they are processed.
eventOpenAndClose
This constant is not recommended. It is kept for backward compatibility.
A single thread is processed by the signal.
The signal is automatically closed once the thread is processed.
Pending threads: If there is no pending thread, the signal remains closed.
New threads: The new threads are added to the pending queue.
All the threads are processed by the signal.
The signal is automatically closed once all the threads are processed.
New threads: The new threads are added to the pending queue.
eventCloseThe event remains closed.
New threads: The new threads are added to the pending queue.
The event is closed.
New threads: The new threads are added to the pending queue.
Component : wd240vm.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment