PBDR.COM

About   -   Contact   -   Purchase   -   Search   -   What's New

 
 
Stopping Max/Min/Close Buttons on a Sheet
A very common request is to disable the minimize and maximize buttons on an MDI sheet. This tips comes with a disclaimer: you are taking away from the 'purpose' of MDI sheets.

Here's the code:

Map this to the userevent: PBM_SYSCOMMAND

IF message.wordparm = 61488 THEN // Maximize Button
        message.processed = TRUE
        message.returnvalue = 1
END IF
IF message.wordparm = 61472 THEN // Minimize button
        message.processed = TRUE
        message.returnvalue = 1
END IF
IF message.wordparm = 61536 THEN // Close the Window
        message.processed = TRUE
        message.returnvalue = 1
END IF

 

Top of Page

Legal Notice

Ken Howe 2011