Hi, Esteban -
If an application does not process any event messages from the active window's message queue, the Windows O/S "hides" the application from the desktop and displays in its place the last known image of the window that the O/S rendered, with a custom title/caption and a working "X" (cancel) button in the upper-right corner. This is called "ghosting" and it is a feature of Windows.
PB apps that do NOT use themes utilize the Windows O/S to render the window, so the user sees the "ghosted" window after five seconds of waiting (such as waiting for a long-running database retrieval to complete, for example).
When PB themes are used, I believe PB takes over the rendering of the application/windows from the Windows O/S, so Windows has no knowledge of what the application is displaying... the result is an empty, black rectangle when ghosting takes effect.
You can disable the "ghosting" feature that Windows provides after five seconds of waiting for a process/activity to finish, using the following Windows API external function declaration in PB:
Subroutine DisableProcessWindowsGhosting() Library "user32.dll"
Then call the API function in PowerScript:
DisableProcessWindowsGhosting()
Once disabled, it is turned off for the life of the process/application... there is no way to turn this feature back on.
If you want to learn more about unresponsive Windows application, you may wish to read the following article:
https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/325-why-unresponsive-application-windows-are-ghosted-by-the-windows-o-s
Best regards, John