[Talk] System dialog boxes (such as browse directories) are hidden behind the main form, causing the program to be unable to manipulate the temporary processing mode 2017-12-28? C + + Builder, Delphi, talk ? No comments? swish ? 590 views
To be honest, I have been troubled by this problem for many years, for specific reasons I have not actually found it yet. However, here is a temporary workaround, using a timer to check whether the active window of the current process is consistent with the screen.activeform, and if not, check if Screen.activeform is disabled (be careful not to look at its Enabled, but instead call API), if it is disabled, then the popup dialog box is not the Delphi Form, we call SetWindowPos to the other adjustments to the front display can be, the timer processing code reference is as follows:
delphi/pascal
12345678 |
procedure TForm1. Timer1timer(Sender:tobject); var atopwindow:thandle; begin atopwindow: =GetActiveWindow; if ( Span class= "crayon-v" >atopwindow<>screen activeform. Handle and (not IsWindowEnabled< Span class= "Crayon-sy" > (screen. Activeform. Handle) then setwindowpos(atopwindow,hwnd_top,0,0,0,0, swp_nosize OR swp_nomove); end; |
This temporary is a palliative approach, as to the root of the solution, because the individual set up Demo test many times can not reproduce, so temporarily give up, forced to ...
System dialog boxes (such as browse directories) are hidden behind the main form, resulting in temporary processing of programs that cannot be manipulated