;Autor: MrMat EnableExplicit Define hWnd Define header Define a Global oldproc.l Global newheight.l #LVM_GETHEADER = #LVM_FIRST + 31 Procedure.l WinProc(hWnd.l, Msg.l, wParam.l, lParam.l) Protected result.l Protected *hdlayout.HD_LAYOUT Protected *rect.RECT Protected *windowpos.WINDOWPOS result.l = 0 If Msg = #HDM_LAYOUT result = CallWindowProc_(oldproc, hWnd, Msg, wParam, lParam) *hdlayout.HD_LAYOUT = lParam If *hdlayout\prc <> 0 *rect.RECT = *hdlayout\prc *rect\top = newheight EndIf If *hdlayout\pwpos <> 0 *windowpos.WINDOWPOS = *hdlayout\pwpos *windowpos\cy = newheight EndIf Else result = CallWindowProc_(oldproc, hWnd, Msg, wParam, lParam) EndIf ProcedureReturn result EndProcedure If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) ExplorerListGadget(1,10,10,480,230,"C:\",0) newheight = 50 header = SendMessage_(GadgetID(1), #LVM_GETHEADER, 0, 0) oldproc = SetWindowLongPtr_(header, #GWL_WNDPROC, @WinProc()) SetWindowPos_(header, 0, 0, 0, GadgetWidth(1), newheight, #SWP_NOZORDER | #SWP_NOMOVE) Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf