Both 'No Sooner…Than' and 'Hardly…When' are used to mean exactly the same. It is when something has happened just before something else. The first of the actions expressed with 'no sooner' or 'hardly', has happened right before the part after 'than' or 'when'.
One thing to remember with these constructions is never to use 'when' with 'no sooner' or 'tha