Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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

Delphi
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
Updated 12-Jun-13 11:14am
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900