How to remove the little Close button when using ManualDock

Hi,

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.

Wayne
coracleitAsked:
Who is Participating?
 
JohnjcesConnect With a Mentor Commented:
Try this:

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

Works for me on normal forms.
0
 
mokuleCommented:
I don't try it. Just a guess.
What about setting

BorderIcons.biSystemMenu := False;
0
 
coracleitAuthor Commented:
I wish it was that simple .. thanks anyway
0
 
tanghzCommented:
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
0
 
JohnjcesCommented:
The code snippet I provided DOES hide the close (X) button, so to the site admins... not sure what else to recommend.

John
0
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.

All Courses

From novice to tech pro — start learning today.