if IsWindowVisible(handle) then
begin
case command of
CSC_NavigateBack: Mainfrm.TBBack.Enabled:=Enable;
CSC_NavigateForward: Mainfrm.TBForward.Enabled:=enable;
CSC_UPDATECOMMANDS:
begin
mainfrm.TBForward.Enabled:=Enable;
mainfrm.TBBack.Enabled:=Enable;
end;
end;//case
end;//begin