Click here to Skip to main content
Rate this: bad
good
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 22:46pm
Edited 12-Jun-13 12:14pm
(no name)151K
v2
Comments
Sergey Alexandrovich Kryukov at 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)



Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 12 Jun 2013
Copyright © CodeProject, 1999-2014
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