The Mode window is displayed in activeform. After switching to another application and switching back, the application cannot get the focus. The mode window is behind the application. What should I do? Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiAPI/html/delphi_20061112180622250.html
Shows the mode window in activeform. When switched to another application ProgramAfter switching back, the application cannot get the focus. The mode window is behind the application. What should I do?
I guess there is no experiment. I don't know if the parent form or owner form of the form is specified. Can this solve your problem.
I have encountered such a problem and cannot solve it all the time.
The upstairs method has been tried. If there is a problem, after specifying the parent form of the mode window, the child form cannot get the focus.
It seems that when the form is displayed, it must be displayed on the top;
Use showmodal;
You can control the mouse over this window.
Note that the parent attribute of your mode window is set as follows:
In an event of activeform
Showform: = tshowform. Create (Self );
Showform. Parent: = self;
Showform. showmodel;
Similarly, MessageBox () is also the case. If handle is set to self. Handle, this will not happen.
Have you tried it upstairs? It doesn't work at all. Once you execute showmodal, the main form including OCX will not respond to the focus.