Note that there are some explanatory texts on larger screens.

plurals
  1. POMultiple app windows activation not working correctly
    text
    copied!<p>I have a Delphi application that has a document browser as the main form. When the user opens a document, we open an editor window. We want to have each editor with a button on the task bar, as well as the main form. I've applied the normal code to do this (below), but when I click on the main form after using the editor window the editor is being left on top, while the focus is on the main form. I'm unable to work out what is causing this behaviour.</p> <p>Stage setting: I open the main form and a document form. </p> <ol> <li><p>Click on another app, click on main form, main form stays focused. (Behaving as expected.)</p></li> <li><p>Click on the document form, click on main form, document form comes back to front, but shown inactive. (Picture shows result)</p></li> </ol> <p><a href="http://www.matthew-jones.com/temp_xfer/titlebarfailure.jpg" rel="nofollow noreferrer">alt text http://www.matthew-jones.com/temp_xfer/titlebarfailure.jpg</a></p> <p>First step, this is Delphi 2007, and I have in the project:</p> <pre><code>Application.MainFormOnTaskBar := True; </code></pre> <p>For the main form, I have no additional code.</p> <p>For the document form, I have</p> <pre><code>procedure TCommonEditForm.CreateParams(var params: TCreateParams); begin inherited; params.WndParent := 0; // GetDeskTopWindow; no diff end; </code></pre> <p>I've tried to work out if there is a message that is making this happen, but can't locate anything appropriate. I've searched the code for anything to do with "activate". Clues welcome!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload