Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/VCL/Core VCL Classes/TForm    [ Add a report in this area ]  
Report #:  49410   Status: Closed
Non-modal form focus issues (1)
Project:  Delphi Build #:  11.0.2709.7128
Version:    11.0 Submitted By:   Robert Pallot
Report Type:  Suggestion / Enhancement Request Date Reported:  7/22/2007 5:28:57 PM
Severity:    Serious / Highly visible problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   247932
Resolution: As Designed (Resolution Comments) Resolved in Build: : 12.0.3112.14858
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 8
1- With the MainformOnTaskbar property set, a form cannot move behind the main form
in Z-order. This is the subject of at least two other QC reports (see QC items 45605 and
Steps to Reproduce:
Compile and run the attached sample application.

A non-modal child form is created automatically when the project is executed.

1- Click on the main form. Note it does not go to the top of the Z-order. This is incorrect behaviour. The child form should go behind the main form.

Workaround for point 1.

- Override the CreateParams method and set the WndParent member of the Params parameter to 0. This allows the non-modal child form to go behind the main form.

Doing this does create further problems however.

If a modal dialogue is then launched from the non-modal child form, the non-modal form is pushed to the bottom of the Z-order, and effectively disappears. It reappears when the modal dialogue is closed.

This behaviour can be corrected by setting the modal dialogue PopupMode to pmExplicit, and the PopupParent to point to the non-modal form.

It is clumsy, but it does work. Surely there must be a better way!!

Robert Pallot at 7/23/2007 7:23:16 PM -
This issue originally recorded two other related issues, which I've off into separate QC reports; QC49463 and QC49465.

Dale Derix at 1/26/2009 10:33:21 AM -
It would really be nice to have this resolved.  The workaround is awkward and time consuming but the alternative is the loss of Vista functionality.

Server Response from: ETNACODE01