Click here to Skip to main content
11,934,389 members (71,341 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);
   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 22:46pm
Edited 12-Jun-13 12:14pm
Maciej Los210.1K
Sergey Alexandrovich Kryukov 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.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