PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD20] Disable All Input on a Window
[WD20] Disable All Input on a Window
Iniciado por guest, 11,sep. 2017 22:54 - 1 respuesta
Publicado el 11,septiembre 2017 - 22:54
I have a popup window that serves as a loading window. It consists of a background image and a small image that contains an ajax spinner gif. If I click on this loading window too many times the ajax spinner stops animating. If I click once more Windows displays, "App is not responding".

Is there a way to disable all input so that this does not happen? I tried putting an empty super control over the top of the entire window, but this only seems to give me a few extra clicks. This window is displayed via threading code below.

PROCEDURE DisplayLoadingWindow() ThreadExecute("ThreadLoadingWindow", threadNormal, ExecuteLoadingWindow) ThreadWaitSignal()
PROCEDURE ExecuteLoadingWindow() // Show Window OpenChild(WIN_Popup_Loading) // Wait for Signal ThreadSendSignal(threadMain) EventWait("CloseLoadingWindow") // Close Window Close(WIN_Popup_Loading) // End Thread ThreadEnd()
PROCEDURE CloseLoadingWindow() EventChange("CloseLoadingWindow", eventOpen)
Publicado el 12,septiembre 2017 - 12:56
Hi Curtis,

there is a good chance that the problem is coming from you ignoring the FIRST and MOST IMPORTANT rules of using threads: do NOT access the UI from a secondary thread, EVER.

And of course, opening a window from a secondary thread is smack in the middle of that one.

Any action on the UI from a secondary thread must be done through one of the 3 (from memory) workarounds described in the threads help.

Best regards