Kbase P186860: Incorrect z-order among application windows on Windows Vista or Windows 7
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  29/04/2011 |
|
Status: Unverified
SYMPTOM(s):
Incorrect z-order among application windows on Windows Vista or Windows 7
If a calling window takes more than 5 seconds to prepare data to display in a called window, and the user gives focus to the desktop or another application before the called window is displayed, the called window opens behind the calling window.
Calling window displays "(Not Responding)" in title bar after 5 seconds.
All application windows lose most visible signs of focus after 5 seconds.
Window close button ("X" button in upper left corner of window) turns red on all application windows after 5 seconds if Aero is used.
FACT(s) (Environment):
Called window opens in front of calling window if processing done by calling window takes less than 5 seconds.
Called window opens in front of calling window if the user does not give focus to the desktop or another application before the called window is displayed.
Called window always opens in front of calling window on Windows XP.
Windows Vista
Windows 7
OpenEdge 10.2B
CAUSE:
This is expected behavior. On Windows Vista or Windows 7, as compared to Windows XP, different Windows API events are fired when a window is not responding and when focus is changed. The particular combination of events that are fired cause the new window to display behind the window that called it under the conditions described above.
FIX:
Depending on the application, possible workarounds for this behavior include:
Use the Windows API SetForegroundWindow function to control the placement of the new window.
Display the called window as a placeholder before doing the processing to prepare its data. This will ensure that the called window is displayed before the calling window enters the "Not Responding" state.
Execute a PROCESS EVENTS statement periodically during the background processing in the calling window. This allows available Windows API events to be processed, preventing the calling window from entering the "Not Responding" state.