PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD]Event function crashes the application
[WD]Event function crashes the application
Iniciado por guest, 08,ago. 2016 14:44 - No hay respuesta
Publicado el 08,agosto 2016 - 14:44
Hi everyone,

I'm using an Event function that calls the function #RestartTimer with this syntax:
Event(#RestartTimer, "WIN_Main.*", WM_MOUSEACTIVATE)

Basically, it triggers whenever i click on a control found on the window, and #RestartTimer closes a thread (if its state is threadRunning) and then it opens again, as shown below:

IF ThreadState("TH_idle") = threadRunning THEN ThreadStop("TH_idle")
ThreadExecute("TH_idle",threadWaitForStart,#Timer)

I've tried to trigger the event via project testing, and it hasn't skipped a beat, but I've tried that via the generated executable, and the exe freezes... How do I fix that?
TIA