Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Apr : Disabling the Maximize menu button

www.cryer.info
Managed Newsgroup Archive

Disabling the Maximize menu button

Subject:Disabling the Maximize menu button
Posted by:"Larry Dew" (ld..@xegsys.net)
Date:Fri, 07 Apr 2006 14:41:31 -0500

I need to disable the Maximize button on the main form's system menu. I
have tried the following code and it does not seem to do anything?

   h_Menu := GetSystemMenu(Self.Handle, FALSE);
   EnableMenuItem(h_Menu, SC_MAXIMIZE, MF_BYCOMMAND or MF_GRAYED);

I have used this code (changing SC_MAXIMIZE to SC_CLOSE) and it works to
disable the Close button. Any Ideas?
Thanks

Replies:

www.cryer.info
Managed Newsgroup Archive