It's very common to want to find the closest parent of a specific class. So, it pays dividends to make a function to do just that.
function GetParentWithClass(Control: TControl;
ClassType: TWinControlClass): TWinControl;
begin
Result := Control.Parent;
while Assigned(Result) and not (Result is ClassType) do
Result := Result.Parent;
end;
Once you have this in place you can use it to solve your current problem.
var
PageIndex: Integer;
TabSheet: TTabSheet;
.....
TabSheet := GetParentWithClass(Control, TTabSheet) as TTabSheet;
PageIndex := TabSheet.PageIndex;
Having separated the concerns like this you can make use of GetParentWithClass
in other settings.