>>> Const WS_MINIMIZEBOX = &H20000 >>> Const WS_MAXIMIZEBOX = &H10000 >>>>>>
>>> L = GetWindowLong(Me.hWnd, GWL_STYLE) >>> L = L And Not (WS_MINIMIZEBOX) >>> L = L And Not (WS_MAXIMIZEBOX) >>> L = SetWindowLong(Me.hWnd, GWL_STYLE, L) >>>>>>
DECLARE INTEGER SetWindowLong IN user32; INTEGER HWND,; INTEGER nIndex,; INTEGER dwNewLong DECLARE INTEGER GetWindowLong IN user32; INTEGER hWnd, INTEGER nIndex #DEFINE GWL_STYLE -16 #DEFINE WS_MINIMIZEBOX 0x20000 #DEFINE WS_MAXIMIZEBOX 0x10000 lnhwnd = thisform.hwnd CurrentStyle = GetWindowLong(lnhwnd, GWL_STYLE) *!* Both min and max must be removed before they actually disappear *!* otherwise buttons are just disabled individually but still shown CurrentStyle = BITAND(CurrentStyle, BITNOT(WS_MINIMIZEBOX)) CurrentStyle = BITAND(CurrentStyle, BITNOT(WS_MAXIMIZEBOX)) *!* code similar to this commented out stuff is used to turn on the buttons *!* CurrentStyle = BITOR(CurrentStyle, WS_MINIMIZEBOX) *!* CurrentStyle = BITOR(CurrentStyle, WS_MINIMIZEBOX) X = SetWindowLong(THISFORM.HWND, GWL_STYLE, CurrentStyle)