'Done in Excel
Private Sub SetFormStyle()
Dim lStyle As Long, hMenu As Long
'Have we got a form to set?
If mhWndForm = 0 Then Exit Sub
'Get the basic window style
lStyle = GetWindowLong(mhWndForm, GWL_STYLE)
'Build up the basic window style flags for the form
SetBit lStyle, WS_CAPTION, mbCaption
SetBit lStyle, WS_SYSMENU, mbSysMenu
SetBit lStyle, WS_THICKFRAME, mbSizeable
SetBit lStyle, WS_MINIMIZEBOX, mbMinimize
SetBit lStyle, WS_MAXIMIZEBOX, mbMaximize