How to remove the little Close button when using ManualDock

Posted on 2004-04-12
Medium Priority
Last Modified: 2012-08-14

I have an application that docks forms onto a Tpanel (Outlook style...menu on left, contents on right)

My question is when ManualDock is used, it creates the little thin line at the top of the form with a small close button.

How do I prevent this close button from appearing, as I close all forms programatically.

Question by:coracleit
LVL 17

Expert Comment

ID: 10805005
I don't try it. Just a guess.
What about setting

BorderIcons.biSystemMenu := False;

Author Comment

ID: 10805044
I wish it was that simple .. thanks anyway
LVL 18

Accepted Solution

Johnjces earned 120 total points
ID: 10806462
Try this:

EnableMenuItem(GetSystemMenu(Handle, False), SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);

Works for me on normal forms.

Expert Comment

ID: 10806472
If you are using Delphi 7, you can change the Form.border:=None,
Maybe you also need to look at the help related to Form.UseDockManager

good luck
LVL 18

Expert Comment

ID: 13187030
The code snippet I provided DOES hide the close (X) button, so to the site admins... not sure what else to recommend.


Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Watch the video to know how one can repair corrupt Exchange OST file effortlessly and convert OST emails to MS Outlook PST file format by using Kernel for OST to PST converter tool. It can convert OST to MSG, MBOX, EML to access them. It can migrate…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question