i tried to use SetParent to make a non MdiChild form to a MDIChild one the job was done but the new MDIChild does not behave like an actuall one. Does ne1 know another way of showing a non MDI form as a MDIChild?
thnks
Printable View
i tried to use SetParent to make a non MdiChild form to a MDIChild one the job was done but the new MDIChild does not behave like an actuall one. Does ne1 know another way of showing a non MDI form as a MDIChild?
thnks
SetParent alone will work, but your right -- it won't act like a regular child window. You might want to try this code and see if it works for you. It basically tells a window to change into a child.
Hope this was helpful. :)Code:Public Sub MakeChildWindow(hWnd As Long)
Dim lngStyle As Long
lngStyle = GetWindowLong(hWnd, GWL_STYLE)
lngStyle = ((lngStyle And Not WS_POPUP) Or WS_CHILD)
SetWindowLong hWnd, GWL_STYLE, lngStyle
End Sub