We present a generalization to an arbitrary number of spacetime (d) and worldvolume (p+1) dimensions of the formalism proposed by Ferrara, Gibbons and Kallosh to study black holes (p = 0) in d = 4 dimensions. We include the special cases in which there can be dyonic and self-or anti-self-dual black branes. Most of the results valid for 4-dimensional black holes (relations between temperature, entropy and non-extremality parameter, and between entropy and black-hole potential on the horizon) are straightforwardly generalized.We apply the formalism to the case of black strings in N = 2, d = 5 supergravity coupled to vector multiplets, in which the black-string potential can be expressed in terms of the dual central charge and work out an explicit example with one vector multiplet, determining supersymmetric and non-supersymmetric attractors and constructing the non-extremal black-string solutions that interpolate between them.