用最笨的办法写了一个,汗!<br>function GetRectIsOverlap(Rect1,Rect2:TRect):boolean;<br> begin<br> result := false;<br><br> if Rect2.Left > Rect1.Left then<br> begin<br> if Rect2.Left < Rect1.Right then<br> if Rect2.Top > Rect1.Top then<br> begin<br> if Rect2.Top < Rect1.Bottom then<br> result := true<br> end<br> else<br> begin<br> if Rect2.Bottom > Rect1.Top then<br> result := true;<br> end;<br> end<br> else<br> begin<br> if Rect1.Left < Rect2.Right then<br> if Rect2.Top > Rect1.Top then<br> begin<br> if Rect2.Top < Rect1.Bottom then<br> result := true<br> end<br> else<br> begin<br> if Rect2.Bottom > Rect1.Top then<br> result := true;<br> end;<br> end;<br> end;