Click here to Skip to main content
11,804,574 members (74,375 online)
Rate this: bad
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);
   hMenuHandle : Integer;
     hMenuHandle := GetSystemMenu(panBorder.Handle, False);
     if (hMenuHandle <> 0) then
     DeleteMenu(hMenuHandle , SC_CLOSE, MF_BYCOMMAND);

Kindly check my code and give some suggestion Please.?
Posted 11-Jun-13 21:46pm
Edited 12-Jun-13 11:14am
(no name)202.4K
Sergey Alexandrovich Kryukov at 12-Jun-13 17:29pm
Where is your "override" clause?

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

  Print Answers RSS
0 OriginalGriff 3,205
1 Maciej Los 1,950
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,187

Advertise | Privacy | Mobile
Web04 | 2.8.151002.1 | Last Updated 12 Jun 2013
Copyright © CodeProject, 1999-2015
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