  We study the influence of a background uniform magnetic field and boundary
conditions on the vacuum of a quantized charged massive scalar matter field
confined between two parallel plates; the magnetic field is directed
orthogonally to the plates. The admissible set of boundary conditions at the
plates is determined by the requirements that the operator of one-particle
energy squared be self-adjoint and positive definite. We show that, in the case
of a weak magnetic field and a small separation of the plates, the Casimir
force is either attractive or repulsive, depending on the choice of a boundary
condition. In the case of a strong magnetic field and a large separation of the
plates, the Casimir force is repulsive, being independent of the choice of a
boundary condition, as well as of the distance between the plates.
