A method of forming a solder resist pattern on a printed circuit board, which comprises applying on the surface of said printed circuit board a photosensitive thermosetting resin composition comprising (A) a photosensitive prepolymer containing at least two ethylenically unsaturated bonds in the molecular unit threof, (B) a photopolymerization initiator, (C) a photopolymerizable vinyl monomer and/or an organic solvent, as a diluent, (D) a finely powdered epoxy compound containing at least two epoxy groups in the molecular unit thereof and exhibiting sparing solubility in the diluent to be used, and optionally (E) a curing agent, for epoxy resin, exposing the applied layer of said composition selectively to an actinic ray through a photomask having a given pattern, developing the unexposed portion of the applied layer with a developing solution thereby giving rise to a resist pattern, and thereafter thermosetting said finely powdered epoxy compound by application of heat.