Yes there are more than a few of those kind of errors that only show up at runtime. Did you try what I suggested? I know that Win2000 and XP are quite different in the way they react to changes in the z-order of forms, or when setting topmost, or BringToFront. But I'm almost positive that this was how I solved a similar problem a couple of years ago, Unfortunately the source code for the utility is on a CD-RW that is still packed up in a box that is still at the home I recently moved from. So I can't be sure that I also didn't do something else.
from: Robert Meek at: [EMAIL PROTECTED] dba "Tangentals Design" home of "PoBoy" freeware Windows apps and utilities located at: www.TangentalsDesign.com Proud to be a moderator for the "Delphi Programming Lists" at: elists.org -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rainer von Saleski Sent: Tuesday, October 18, 2005 2:38 PM To: Borland's Delphi Discussion List Subject: Re: Form won't hide (sometimes) The reason that I tried the Hide in the first place is that (BEFORE I added the Hide call) the ShowMessage display appeared BEHIND the main form. The focus moved to the ShowMessage display (clicking on the main form got a "clunk" sound and no action), but the ShowMessage display was totally invisible. Not even the red-X close box was active on the front form. One could bring the ShowMessage box forward by using the task bar symbols or Alt-Tab. It especially perplexes me that this odd behavior only happens when running the .EXE file, and not in the development environment. Rainer ----- Original Message ----- From: "Robert Meek" <[EMAIL PROTECTED]> To: "'Borland's Delphi Discussion List'" <[email protected]> Sent: Monday, October 17, 2005 12:57 PM Subject: RE: Form won't hide (sometimes) First of all I would question your choice to only hide this form if the backup was successful. I never leave any forms in memory after they are no longer or immediately needed. It makes little sense from a resource point of view. I would simply call the Form's close method and then in the Form's OnClose Method I would run my "NoErrors" test. If True then I would set the form to nil and call Action := caFree; If False I would call Action := caNone and use the showMessage or MessageDlg to inform the user that he may need to try again or whatever you want your alternate choice to be. Provided the ShowMessage is the last call made for that particular branch it should stay on top of the calling form. I think the reason it's not in your case might have something to do with it not being able to function properly after a Hide command, thus it reappears above the ShowMessage. I've noticed twice before where it seems that calling Hide is usually of less value than setting the Form's visible property to False! from: Robert Meek at: [EMAIL PROTECTED] dba "Tangentals Design" home of "PoBoy" freeware Windows apps and utilities located at: www.TangentalsDesign.com Proud to be a moderator for the "Delphi Programming Lists" at: elists.org -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rainer von Saleski Sent: Monday, October 17, 2005 4:25 AM To: Borland's Delphi Discussion List Subject: Form won't hide (sometimes) When a unit finishes its work, I want the form to disappear and I want to display a message to let the user know how things went. So I've tried the obvious: Backup.Hide; if NoErrors then ShowMessage ('Backup Completed OK') else ShowMessage ('*** BACKUP FAILED ***'); My problem is that this works as expected when run from the Delphi 7 development environment ... but when run from the executable file, the form does not disappear, and the ShowMessage box is displayed BEHIND the Backup form (which is supposed to be hidden). And, yes, the focus has moved to the message box (which confuses everyone, because it can't be seen). So ... what magic invocation do I need to make the Hide actually take effect? Thanks, Rainer _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

