如果我找对你
function IsIntersertButNotContained(const R1, R2: TRect): Boolean;
var
R: TRect;
begin
// R1 and R2 intersect
Result:= IntersectRect(R, R1, R2)
// R1 is not contained within R2
and not EqualRect(R, R1)
// R2 is not contained within R1
and not EqualRect(R, R2);
end;
Run Code Online (Sandbox Code Playgroud)