Simple: had+IIIrd form of the verb
1.a past action completed before another past action or before another past moment
Eg: Tom had come before we pho 15115c215p ned.
He said he had done his lessons.
2.with the adverbs: hardly, scarcely -> when
no sooner -> than
Eg: He had hardly entered the room when the phone rang.
We had no sooner seen each other than we started talking.
Fii atent: adverbul in fata => inversiune: Hardly had he finished the first novel when he started the second one.
Continous: to be (past perfect)+vb inf
1.a past action started before another past action or before another past moment and still going on during it: for, since
Eg: He had been waiting for me for two hours when I finally arrived.
He had been studying since morning when I came to take him to the cinema.