Click here to Skip to main content
12,396,230 members (56,217 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Delphi
I don't want that users can close the panel by pressing the 'X' button on the top-right corner.But... when the panel is docked, a little 'x' appear on the corner of the panel, is there a way to hide this little button?

I have tried code on create dock panel, but it is not working

procedure Tframe1.panBorderEndDock(Sender, Target: TObject; X,  Y: Integer);
 var
   hMenuHandle : Integer;
   begin
     inherited;
     hMenuHandle := GetSystemMenu(panBorder.Handle, False);
     if (hMenuHandle <> 0) then
     DeleteMenu(hMenuHandle , SC_CLOSE, MF_BYCOMMAND);
   end;

Kindly check my code and give some suggestion Please.?
Posted 11-Jun-13 21:46pm
Updated 12-Jun-13 11:14am
Maciej Los221.8K
v2
Comments
Sergey Alexandrovich Kryukov 12-Jun-13 17:29pm
   
Where is your "override" clause?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 12 Jun 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100