Development of a diode-laser-based technique for high-resolution photoacoustic detection is reported. This method has been tested and compared using identical photoacoustic instrumentation (cell and microphone) in three different spectral regions with a variety of absorbing gases. These studies were: infrared range near 2100 cm$^{-1}$ - CO and OCS fundamental band transitions; range near 4200 and 4350 cm$^{-1}$ - CH$_4$ and NH$_3$ overtone and combination band transitions; near-infrared range near 6500 cm$^{-1}$ - CO, CO$_2$ and NH$_3$ overtone transitions. Several types of diode laser operating at room temperature or at liquid nitrogen temperature were employed and compared. The optimum gas pressures for maximum sensitivity of the photoacoustic signals were determined, and detection limits were estimated for all of the gases studied. The best sensitivity was achieved for NH$_3$ at 100 ppbv. The sensitivity of the system was also tested for trace detection of NH$_3$ and CO$_2$ in automobile exhaust for different cars and different fuel types.