Hi Cristian, I did some testing in Lazarus to paint over a MainMenu, trying to hide the white line. Something like this can work but you have to trigger the redrawing (and end-of-drawing) of the MainMenu:
var
XFrame, YFrame; {X and Y size of Sizeable area of Frame}
begin
{Get size of form frame}
XFrame := GetSystemMetrics(SM_CXFRAME);
YFrame := GetSystemMetrics(SM_CYFRAME);
Canvas.Handle := GetWindowDC(Self.Handle); {Get Device context for drawing}
try
Canvas.Brush.Color:= clBlack;
Canvas.FillRect(XFrame + 0, YFrame + 40, XFrame + 1000, YFrame + 50);
finally
ReleaseDC(Self.Handle, Canvas.Handle);
Canvas.Handle := 0;
end;
// From:
http://www.delphicorner.f9.co.uk/articles/forms6.htm