title: Newly created modal window loses focus and become inacessible in Windows Vista
body: <p>Sometimes when I open a modal window in my Delphi application it takes a while to show up, then I notice that the application is kind of blocked, and what happened was that the modal form was open with ShowModal but wasn't displayed and the application became locked as if the Modal Window was in the first layer.</p>
  
  <p>Usually when this happens I have to use Alt + Tab or Windows + Tab to find the "hidden" modal window, but this doesn't work everytime.</p>
  
  <p>This behavior just happens in Vista, but its quite annoying.</p>
  
  <p>Is there some way to prevent this "focus weirdness" from happening?</p>
  
  <p>Thanks.</p>
  
  <p><strong>* EDIT *</strong></p>
  
  <p>Apparently setting Application.MainFormOnTaskbar := True solved the problem, but it is still too early to jump to conclusions because this happens randomly.</p>
  
  <p><strong>* EDIT 2 *</strong></p>
  
  <p>ModalFormOnTaskbar didn't solve the problem, after that I tried setting PopupMode = pmAuto , but that just made the problem worst.</p>
  
  <p>Right now I'm trying to set the PopupParent explicitly and will let you know if the problem is solved.</p>