AppDeActivateZOrderFix.pas is a unit that fixes the window focus bug QC #59963 which can accidentally activate a window of a different process if you close a non-modal form. This occurs if you switch to another process, switch back to your application and then close the non-modal form. If you add the AppDeActivateZOrderFix unit to your project the application will keep the focus in this case.
This bug affects both Delphi/C++Builder 2007 and 2009. This bugfix is part of the IDE Fix Pack 1.0 for Delphi/C++Builder 2009 that I’ve released last week which only fixes the bug for the IDE but not for your applications. AppDeActivateZOrderFix.pas is the fix for your applications.
Usage of the unit:
Add it to your project and the initialization section of the unit will install the runtime patch.
Download from CodeCentral:
Andy,
You are ‘Delphi Super Hero’ 🙂
Will this find its way into the next patch?
What patch? The one that CodeGear might release? I don’t know.
I apologize, I assumed you were part of the CodeGear developer team.