Board index » delphi » How to remove or disable the Window Close (X) button on a form

How to remove or disable the Window Close (X) button on a form

This must have been asked a thousand time ... How to remove, get rid of or
at least disable the Close button on a regular Window's form (keeping the
minimize & maximize buttons). Thanks.
RP
 

Re:How to remove or disable the Window Close (X) button on a form


In your forms object Inspector you can setup the BorderIcons. You can set
each one to true or false.

Hope this helps you.

Peter Vrist
peter.vrist.removet...@mail.dk

"Videotron" <r...@mail.com> skrev i en meddelelse
news:DBWQ6.4242$UH5.245896@wagner.videotron.net...

Quote
> This must have been asked a thousand time ... How to remove, get rid of or
> at least disable the Close button on a regular Window's form (keeping the
> minimize & maximize buttons). Thanks.
> RP

Re:How to remove or disable the Window Close (X) button on a form


"Videotron" <r...@mail.com> a crit dans le message
news:
DBWQ6.4242$UH5.245...@wagner.videotron.net...

Quote
> This must have been asked a thousand time ...

How to remove, get rid of or
Quote
> at least disable the Close button on a regular

Window's form (keeping the

Quote
> minimize & maximize buttons). Thanks.

I doubt if this has been asked frequently as it is
so simple. You'll find the answer under
BorderIcons in the object inspector for the form.

Do try and read the manual occasionally.

John

Re:How to remove or disable the Window Close (X) button on a form


I know about BorderIcons setup.
But SORRY . BorderIcon property do not keep Minimize Button on the title bar
when the System Button is set to False  !!!! :::::::Try it :::::

So no way to have the Minimize Button ONLY.
There must some Window API code to fullfil this task ????.
RP

"Videotron" <r...@mail.com> a crit dans le message news:
DBWQ6.4242$UH5.245...@wagner.videotron.net...

Quote
> This must have been asked a thousand time ... How to remove, get rid of or
> at least disable the Close button on a regular Window's form (keeping the
> minimize & maximize buttons). Thanks.
> RP

Re:How to remove or disable the Window Close (X) button on a form


Why do you want your Window to have this behaviour? It doesn't sound too
user-friendly to me. If it is to prevent the user from accidentally closing
the Window in some circumstances try using the OnCloseQuery event,

Chris Burrows
CFB Software
http://www.cfbsoftware.com.au

Quote
"Videotron" <r...@mail.com> wrote in message

news:9OhR6.18421$UH5.907413@wagner.videotron.net...
Quote
> I know about BorderIcons setup.
> But SORRY . BorderIcon property do not keep Minimize Button on the title
bar
> when the System Button is set to False  !!!! :::::::Try it :::::

> So no way to have the Minimize Button ONLY.
> There must some Window API code to fullfil this task ????.
> RP

> "Videotron" <r...@mail.com> a crit dans le message news:
> DBWQ6.4242$UH5.245...@wagner.videotron.net...
> > This must have been asked a thousand time ... How to remove, get rid of
or
> > at least disable the Close button on a regular Window's form (keeping
the
> > minimize & maximize buttons). Thanks.
> > RP

Re:How to remove or disable the Window Close (X) button on a form


Quote
"Videotron" <r...@mail.com> wrote in message

news:9OhR6.18421$UH5.907413@wagner.videotron.net...

Quote
> I know about BorderIcons setup.
> But SORRY . BorderIcon property do not keep Minimize Button on the title
bar
> when the System Button is set to False  !!!! :::::::Try it :::::

> So no way to have the Minimize Button ONLY.
> There must some Window API code to fullfil this task ????.
> RP

Aha... now I know what you're up to... but that is 'illegal' my friend...
the Windows guidelines require that any application can be used without
pointing device, such as a mouse. So how are you going to meet that
guideline if there is a button, but no other way of minimizing the window?

- daniel

Re:How to remove or disable the Window Close (X) button on a form


I wanted to use a popup menu from an icon tray as the only way to to
minimize or close the form.  But now i realized that it may be a weird
design. I will keep the Min. & X buttons on the form for clarity sake.
Thanks all.
----------------------------

"Daniel Rutten" <n...@junk.com> a crit dans le message news:
3b15c...@news.attica.net.nz...

Quote

> "Videotron" <r...@mail.com> wrote in message
> news:9OhR6.18421$UH5.907413@wagner.videotron.net...
> > I know about BorderIcons setup.
> > But SORRY . BorderIcon property do not keep Minimize Button on the title
> bar
> > when the System Button is set to False  !!!! :::::::Try it :::::

> > So no way to have the Minimize Button ONLY.
> > There must some Window API code to fullfil this task ????.
> > RP

> Aha... now I know what you're up to... but that is 'illegal' my friend...
> the Windows guidelines require that any application can be used without
> pointing device, such as a mouse. So how are you going to meet that
> guideline if there is a button, but no other way of minimizing the window?

> - daniel

Re:How to remove or disable the Window Close (X) button on a form


The message <vhnR6.7$Ln4.1...@weber.videotron.net>
  from  "Videotron" <r...@mail.com> contains these words:

Quote
> > Aha... now I know what you're up to... but that is 'illegal' my friend...
> > the Windows guidelines require that any application can be used without
> > pointing device, such as a mouse. So how are you going to meet that
> > guideline if there is a button, but no other way of minimizing the window?

> > - daniel

So how do you open and close the volume control in the system tray
using the keyboard? Come to think of it why don't any of the quick
launch buttons on the task bar work without a mouse?

--
Sincerely,

Andreas Kyriacou
----------------
http://www.andrikkos.co.uk (Imagine! Image Viewer)

Other Threads