• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1530
  • Last Modified:

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
0
coracleit
Asked:
coracleit
1 Solution
 
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
 
JohnjcesCommented:
Try this:

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

Works for me on normal forms.
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

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now