'delete maximize option for MDIForm
'put the next code 

on

the MDIForm Option Explicit Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd

as

Long, ByVal bRevert

as

Long)

as

Long Private Declare Function DeleteMenu Lib "user32" (ByVal hMenu

as

Long, ByVal nPosition

as

Long, ByVal wFlags

as

Long)

as

Long Const MF_BYPOSITION = &H400& Private

sub

MDIForm_Load()

dim

hSysMenu

as

Long

dim

lngResult

as

Long 'delete maximize hSysMenu = GetSystemMenu(Me.hwnd, False) '0 = restore '1 = move '2 = size '3 = maximize '4 = minimize lngResult = DeleteMenu(hSysMenu, 4, MF_BYPOSITION) If lngResult = 0 Then MsgBox "error; cannot delete

menu

item!" End Sub
Return