Irradiation of thin metallic foils in a High Voltage Electron Microscope (HVEM) has been widely used for investigating void swelling. One of the observations in HVEM experiments is the formation of void denuded zones in foils prepared from metals and alloys preconditioned by neutron irradiation. Under electron irradiation, pre-existing voids shrink in regions near foil surfaces. Such a shrinkage is thought to occur without any transfer of vacancies to other voids and is proposed to be related to the interstitial flux exceeding the vacancy flux into near-surface voids. In the present paper internal stresses arising due to non-uniform swelling under conditions of HVEM irradiation are taken into consideration. It is demonstrated that by assuming the presence of sufficiently large stress gradients within the foil one can explain the origin of the void shrinkage in near-surface zones and also explain why a swelling enhancement is often observed on the boundary of the voided zone.