PDA

Click to See Complete Forum and Search --> : Resize MDI parent form


Hui
Jan 26th, 2000, 05:26 PM
Hi
I'd like to find out if there's to disable resize for MDI parent form and to disable the maximum control button on the MDI form.
Please advice

Aaron Young
Jan 26th, 2000, 09:17 PM
Sure, try this:
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const GWL_STYLE = (-16)
Private Const WS_MAXIMIZEBOX = &H10000
Private Const WS_THICKFRAME = &H40000

Private Sub MDIForm_Load()
Call SetWindowLong(hwnd, GWL_STYLE, _
GetWindowLong(hwnd, GWL_STYLE) _
Xor WS_THICKFRAME Xor WS_MAXIMIZEBOX)
End Sub

------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
ajyoung@pressenter.com