Let Q be an n-dimensional convex domain, and let nu is an element of [0, 1/2]. For all f is an element of H-0(1) (Omega) we prove the inequality [GRAPHICS] where delta = dist(x, partial derivative Omega), delta(0) = sup delta. The factor lambda(2)(nu) is sharp for all dimensions, lambda(nu) being the first positive root of the Lamb type equation J(nu)(lambda(nu)) + 2 lambda(nu)J(nu)'(lambda(nu)) = 0 for Bessel's functions. In particular, the case nu = 0 with lambda(0) = 07 940... presents a new sharp form of the Hardy type inequality due to Brezis and Marcus, while in the case nu = 1/2 with lambda(1/2) = pi/2 we obtain a unified proof of an isoperimetric inequality due to 1/2 Poincare for n = 1, Hersch for n = 2 and Payne and Stakgold for n >= 3. A generalization. when the latter integral is replaced by the integral integral(Omega) vertical bar f vertical bar(2)/delta(2-m) dx, m > 0, is proved, too. As a special case, we obtain the sharp inequality [GRAPHICS] where j(nu) is the first positive zero of J(nu).