Films of BC(x)N(y) were produced in a plasma-enhanced chemical vapor deposition process using trimethylborazine as precursor and with H2, He, N2, and NH3, respectively, as auxiliary gas. These films deposited on Si(100) wafers or fused quartz glass substrates were characterized chemically by X-ray photoelectron spectroscopy and by synchrotron radiation-based total-reflection X-ray fluorescence combined with near-edge X-ray absorption fine structure. Independent of the auxiliary gas, the B-N bonds are dominating. Furthermore, B-C and N-C bonds were identified. Oxygen, present in the bulk (in contrast to the surface layer of some nanometers, where molecular oxygen and/or water are absorbed) as an impurity, is bonded to boron or to carbon, respectively. The relation of boron and nitrogen changes with the character of the auxiliary gas: cB/cN approximately = 4:3 (for H2 and He) and cB/cN approximately = 1 (for N2 or NH3). Furthermore, physical properties such as the refractive index and the optical band-gap energy were determined.