In recent years, the magnetic and the optoelectronic materials have attracted a great deal interest due to their potential use in industries. Their structural, electronic and optical properties have been widely studied in both theoretical and experimental works. We present here a symmary of our last works on the electronic and magnetic properties of a variety of inorganic compounds. Much of the interest of the presented materials is due to their potential application in "spintronics" devices. In general, the electronic and magnetic properties were studied using first principles calculations based on the density functional theory in the generalized gradient approximation (GGA) and the local spin density approximation (LSDA) as implemented in the WIEN2K code.