In this paper, we propose a mechanical method to determine the first-penetration field Hp, in a bulk of a high-temperature superconductor. It consists in comparing measurement and numerical calculation of forces exerted between a magnet and the superconductor. The deviations between the measured forces and those calculated assuming the superconductor to be at the Meissner state are used to determine the maximum shielding current densities and, subsequently, the first-penetration field. This method allows comparison with other methods and seems to give good results. As an example, we apply it to an YBa2Cu3O7-x sample. In addition, we demonstrate that the transition occurs more easily when the magnet is over the borders than over the center.