procedure TForm1.WMNCPaint(VAR Msg: TWMNCPaint); VAR R: TRect; BEGIN Inherited;Canvas.Handle := GetWindowDC(Handle);R := Bounds(GetSystemMetrics(SM_CXFRAME) +GetSystemMetrics(SM_CXSIZE) + 1,GetSystemMetrics(SM_CYFRAME),GetSystemMetrics(SM_CXSIZE),GetSystemMetrics(SM_CYSIZE));WITH Canvas DOBEGINBrush.Color := clRed;Pen.Color := clLime;Rectangle(R.Left, R.Top, R.Right, R.Bottom);END;ReleaseDC(Handle, Canvas.Handle);END; |