你的各边相交是否相切的意思嘛
procedure TForm1.Panel1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
TControl(Panel1).Perform(WM_SYSCOMMAND,$F012,0);//用于移动panel1,测试用
end;
procedure TForm1.Button1Click(Sender: TObject);
var
RectA, RectB :TRect;
begin
RectA := Panel1.BoundsRect;
RectB := Panel2.BoundsRect;
if (RectA.Left=RectB.Left)or(RectA.Left=RectB.Right)or(RectA.Right=RectB.Left)then
ShowMessage('左右的边相交');
if (RectA.Top=RectB.Top)or(RectA.Top=RectB.Bottom)or(RectA.Bottom=RectB.Top)then
ShowMessage('上下的边相交');
end;