A method for treating a hard surface, in which the surface is brought into contact with an active ingredient selected from compounds of the general formulae IV or V, in which R denotes C 1 -C 12 alkylene; k denotes a number greater than 0, X denotes CO-CH=CH 2, CO-C(CH 3)=CH 2, CO-O-aryl, C 2 -C 6 -alkylene-SO 2 -CH=CH 2, or CO-NH-R 1; and R 1 denotes C 1 -C 30 alkyl, C 1 -C 30 haloalkyl, C 1 -C 30 hydroxyalkyl, C 1 -C 6 -alkyloxy-C 1 -C 30 -alkyl, C 1 -C 6 -alkylcarbonyloxy-C 1 -C 30 -alkyl, amino-C 1 -C 30 -alkyl, mono- or di(C 1 -C 6 -alkyl)amino-C 1 -C 30 -alkyl, ammonio-C 1 -C 3 o-alkyl, polyoxyalkylene-C 1 -C 3 o-alkyl, polysiloxanyl-C 1 -C 30 -alkyl, (meth)acryloyloxy-C 1 -C 30 -alkyl, sulfono-C 1 -C 30 -alkyl, phosphono-C 1 -C 30 -alkyl, di(C 1 -C 6 -alkyl)phosphono-C 1 -C 30 -alkyl, phosphonato-C 1 -C 30 -alkyl, di(C 1 -C 6 -alkyl)phosphonato-C 1 -C 30 -alkyl or a saccharide residue, X having this meaning in the formula I only when k denotes 1, or X denotes (i) the residue of a polyamine, onto which the portion of the formula located between parentheses is attached via NH groups, or (ii) a polymeric skeleton, onto which the portion of the formula located between parentheses is attached via, NH-C 2 -C 6 -alkylene-O or -O-C 2 -C 6 -alkylene-O groups, or (iii) a polymeric skeleton, onto which the portion of the formula located between parentheses is attached via -polysiloxanyl-C 1 -C 30 -alkyl groups, if k denotes a number of greater than 1, and/or the polymers which are obtainable by reacting a polymeric substrate, which has functional groups, which are selected from hydroxy groups, primary and secondary amino groups, with a compound of the general formulae IV or V, and a surfactant. R denotes C 1 -C 12 alkylene; k denotes a number greater than 0, X denotes CO-CH=CH 2, CO-C(CH 3)=CH 2, CO-O-aryl, C 2 -C 6 -alkylene-SO 2 -CH=CH 2, or CO-NH-R 1; and R 1 denotes C 1 -C 30 alkyl, C 1 -C 30 haloalkyl, C 1 -C 30 hydroxyalkyl, C 1 -C 6 -alkyloxy-C 1 -C 30 -alkyl, C 1 -C 6 -alkylcarbonyloxy-C 1 -C 30 -alkyl, amino-C 1 -C 30 -alkyl, mono- or di(C 1 -C 6 -alkyl)amino-C 1 -C 30 -alkyl, ammonio-C 1 -C 3 o-alkyl, polyoxyalkylene-C 1 -C 3 o-alkyl, polysiloxanyl-C 1 -C 30 -alkyl, (meth)acryloyloxy-C 1 -C 30 -alkyl, sulfono-C 1 -C 30 -alkyl, phosphono-C 1 -C 30 -alkyl, di(C 1 -C 6 -alkyl)phosphono-C 1 -C 30 -alkyl, phosphonato-C 1 -C 30 -alkyl, di(C 1 -C 6 -alkyl)phosphonato-C 1 -C 30 -alkyl or a saccharide residue, X having this meaning in the formula I only when k denotes 1, or X denotes (i) the residue of a polyamine, onto which the portion of the formula located between parentheses is attached via NH groups, or (ii) a polymeric skeleton, onto which the portion of the formula located between parentheses is attached via, NH-C 2 -C 6 -alkylene-O or -O-C 2 -C 6 -alkylene-O groups, or (iii) a polymeric skeleton, onto which the portion of the formula located between parentheses is attached via -polysiloxanyl-C 1 -C 30 -alkyl groups, (i) the residue of a polyamine, onto which the portion of the formula located between parentheses is attached via NH groups, or (ii) a polymeric skeleton, onto which the portion of the formula located between parentheses is attached via, NH-C 2 -C 6 -alkylene-O or -O-C 2 -C 6 -alkylene-O groups, or (iii) a polymeric skeleton, onto which the portion of the formula located between parentheses is attached via -polysiloxanyl-C 1 -C 30 -alkyl groups, if k denotes a number of greater than 1, and/or the polymers which are obtainable by reacting a polymeric substrate, which has functional groups, which are selected from hydroxy groups, primary and secondary amino groups, with a compound of the general formulae IV or V, and a surfactant.