  In this paper, the concept of Birkhoff--James orthogonality of operators on a
Hilbert space is generalized when a semi-inner product is considered. More
precisely, for linear operators $T$ and $S$ on a complex Hilbert space
$\mathcal{H}$, a new relation $T\perp^B_A S$ is defined if $T$ and $S$ are
bounded with respect to the seminorm induced by a positive operator $A$
satisfying ${\|T + \gamma S\|}_A\geq {\|T\|}_A$ for all $\gamma \in
\mathbb{C}$. We extend a theorem due to R. Bhatia and P. \v{S}emrl, by proving
that $T\perp^B_A S$ if and only if there exists a sequence of $A$-unit vectors
$\{x_n\}$ in $\mathcal{H}$ such that $\displaystyle{\lim_{n\rightarrow
+\infty}}{\|Tx_n\|}_A = {\|T\|}_A$ and $\displaystyle{\lim_{n\rightarrow
+\infty}}{\langle Tx_n, Sx_n\rangle}_A = 0$. In addition, we give some
$A$-distance formulas. Particularly, we prove \begin{align*}
\displaystyle{\inf_{\gamma \in \mathbb{C}}}{\|T + \gamma S\|}_{A} =
\sup\Big\{|{\langle Tx, y\rangle}_A|; \, {\|x\|}_{A} = {\|y\|}_{A} = 1, \,
{\langle Sx, y\rangle}_A = 0\Big\}. \end{align*} Some other related results are
also discussed.
