This paper deals with computer-generated diffractive elements which transform diverging Gaussian beams of CO2 lasers into user-defined intensity distributions in certain focal domains. For a special case of both scientific and technical interest - a uniformly filled-in rectangle (`flattop') as user-defined intensity distribution - the full cycle of calculation, micro- technological preparation and testing of the element is described. For this element the focus depth and the stability of the beam-shaping with respect to changes of size and divergence of incident Gaussian beams have been studied by computer modeling, as well as diffractive efficiency and accuracy of shaping. Calculated flattop intensity distributions have been compared with corresponding experimental results, measured by an IR camera. On the occasion we could demonstrate a good conformity between experimental and theoretical results of intensity distributions I(x,y,z) respectively, in desired focal plane as well as for planes before and behind focal plane. Likewise, there is such a conformity for the relative amount of power focused into the desired rectangle. For a further beam-forming element transforming a Gaussian TE00-beam into a ring-shaped intensity distribution the calculated phase function and - exemplary - one of the binary masks are presented. First results about focus depth derived by computer modeling are displayed.