procedure TForm1.PageControl1Changing(Sender: TObject; var AllowChange: Boolean); var FPt: TPoint; FIndex: Integer; begin if GetCursorPos(FPt) then begin FPt := PageControl1.ScreenToClient(FPt); FIndex := PageControl1.IndexOfTabAt(FPt.X, FPt.Y); AllowChange := FIndex in [1, 3, 5]; end; end;
var AllowChange: Boolean);
var
FPt: TPoint;
FIndex: Integer;
begin
if GetCursorPos(FPt) then
begin
FPt := PageControl1.ScreenToClient(FPt);
FIndex := PageControl1.IndexOfTabAt(FPt.X, FPt.Y);
AllowChange := FIndex in [1, 3, 5];
end;
end;