
rt := ClientRect; InflateRect(rt, -20, -20);
rgn := TGPRegion.Create(MakeRect(rt));
InflateRect(rt, -2, -2);
path := TGPGraphicsPath.Create; path.AddEllipse(MakeRect(rt));
rgn.Exclude(path); // 形成環形區域
path.Free;
procedure TForm1.FormMouseMove(...);
begin
Text := 'Form1';
if rgn.IsVisible(X, Y) then Text := '在區域中';
end;
標題列即時顯示滑鼠是否進入環形區域,展示 IsVisible 點包含測試。