A code-dependent methodology is proposed to realize beam shaping and polarization control simultaneously by using binary transmitarray (BTA). The BTA unit elements are divided into two types which are linearly polarized in orthogonal directions. By individually designing binary code for each type of unit elements, the radiation pattern and polarization of the synthetic field can be simultaneously defined. To verify this mechanism, four BTAs are designed at Ka band with the same structures but with different binary codes to produce broadside directional beams with horizontal, vertical, left-handed circular, and right-handed circular polarizations, respectively. Furthermore, another BTA is designed to produce two directional beams pointing at different directions with left-handed and right-handed circular polarizations, respectively. Both simulations and measurements have verified that the proposed methodology provides a completely code-dependent mechanism to arbitrarily and independently design radiation patterns and polarizations of the BTAs. This methodology can be readily used to design binary programmable transmit arrays by integrating PIN or varactor diodes to the unit elements, so that radiation patterns and polarizations of the transmit arrays can be dynamically configured by merely changing the aperture codes, hence showing great values and potentials in communication and radar applications.