The generation of two-dimensional thermal convection induced simultaneously by gravity and high-frequency vibration in a bounded rectangular enclosure or in a layer is investigated theoretically and numerically. The horizontal walls of the container are maintained at constant temperatures while the vertical boundaries are thermally insulated, impermeable and adiabatic. General equations for the description of the time-averaged convective flow and, within this framework, the generalized Boussinesq approximation are formulated. These equations are solved using a spectral collocation method to study the influence of vibrations (angle and intensity). Hence, a theoretical study shows that mechanical quasi-equilibrium (i.e., state in which the averaged velocity is zero but the oscillatory component is in general non-zero) is impossible when the direction of vibration is not parallel to the temperature gradient. In the other case, it is proved that the mechanical equilibrium is linearly stable up to a critical value of the unique stability parameter, which depends on the vibrational field. In this paper, it is shown that high-frequency vertical oscillations can delay convective instabilities and, in this way, reduce the convective flow. The isotherms are oriented perpendicular to the axis of vibration. In the case where the direction of vibration is perpendicular to the temperature gradient, small values of the Grashof number, the stability parameter, induce the generation of an average convective flow. When the aspect ratio is large enough, the character of the bifurcation is practically the same as in the limiting case of an infinitely long layer.