'Write this in a module...
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
'Extended Window Style
Public Const WS_EX_MDICHILD = &H40
Public Const GWL_EXSTYLE = (-20)
'Write this in the form that you want
'to change the MDIChild property
Private Sub Form_Load()
Dim l As Long
l = GetWindowLong(Me.hwnd, GWL_EXSTYLE)
l = l And (WS_EX_MDICHILD)
l = SetWindowLong(Me.hwnd, GWL_STYLE, l)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.