You can allow yourself to use the following code. Do use it in Windows with declare. I have edited for you.
Code:
Sub DisableMaximizeButton()
const GWL_STYLE = -16
const WS_MAXIMIZEBOX = &h10000
const WM_NCPAINT = &h85
declare function GetWindowLong lib "user32" alias "GetWindowLongA" (hWnd as integer, nIndex as integer) as integer
declare function SetWindowLong lib "user32" alias "SetWindowLongA" (hWnd as integer, nIndex as integer, value as integer) as integer
declare function SendMessage lib "user32" alias "SendMessageA" (hWnd as integer, msg as integer, wparam as integer, lparam as integer) as integer
dim n, ret as integer
n = GetWindowLong(self.Handle, GWL_STYLE)
n = bitwise.bitand(n, (bitwise.OnesComplement(WS_MAXIMIZEBOX)))
ret = SetWindowLong(self.Handle, GWL_STYLE, n)
ret= SendMessage(self.Handle, WM_NCPAINT, 0, 0)
End Sub
Bookmarks