At 19:23 21/06/2001 +1200, John wrote:
>I use a my own MsgDlg from my library, where I can specify;
>- a header text,
>- message,
>- required buttons,
>-type of message (showing an associated icon):
> - info
> - dialogue
> - error message
> - error message (and terminate)
> Both error messages beep and the 2nd error type terminates the
> application.
>
>Thus no problems (no possibility) with any X close button.
Watch out guys - just because you don't provide a button, doesn't mean it
can't be done. Something like this came up in a discussion about preventing
a form from minimising. Killing the minimise button won't stop users like
me who have special devices like a touch pad with macro keys. One of my
keys closes a window (any window), and another minimises a window. It's
great fun when I hit the minimise button by mistake and end up with a
minimised form that has no restore button. Especially when the form
remembers its state :) Close the app, try again & it's still minimised.
The only real way to stop forms from doing things is by trapping the
windows message (with WMSysCommand) or in the case of a closing form, with
the OnClose event. Not that an unclosable window is a very nice thing in
the first place.
Personally, I like the 'whoops' way out. Many users will want to undo
(cancel/close) what they just did so that they don't have to make a
frightening decisions ('Would you like to delete your back-up files after
you delete everything else?' Yes/No). If I ever see that message pop up
without a way to close or cancel, I'll just choose 'Off'. ;)
Ed
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"