Wow, it only took me 10 year to solve this one proper...
Subclass the WM_WINDOWPOSCHANGING message. The lParam is a WINDOWPOS. In vb6, you need to use RtlMoveMemory api function to copy the lParam to an empty WINDOWPOS variable.
Set the hWndInsertAfter field to HWND_BOTTOM and copy the structure back to the lParam.
In .Net (where I solved this problem), override the wndproc method. Look for the WINDOWPOSCHANGING message.
vb Code:
Dim memloc As IntPtr = m.LParam Dim pos As WINDOWPOS = m.GetLParam(GetType(WINDOWPOS)) pos.hWndInsertAfter = HWND_BOTTOM Marshal.StructureToPtr(pos, memloc, True)




Reply With Quote