procedure SetWindowNoCaption(H:THandle);
Var NStyle,NExStyle: LongInt;
begin
NStyle:=GetWindowLong(H, GWL_STYLE);
NExStyle:=GetWindowLong(H, GWL_EXSTYLE);
NExStyle:=NExStyle or WS_EX_CONTROLPARENT;
NStyle:=NStyle and not WS_Caption;
NStyle:=NStyle or WS_THICKFRAME
SetWindowLong(H, GWL_EXSTYLE,NExStyle);
SetWindowLong(H, GWL_STYLE,NStyle);
SetWindowPos(H,0, 0,0,0,0,SWP_DRAWFRAME or SWP_FRAMECHANGED or SWP_NOACTIVATE or
SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER);
end;