ex. The more, the merrier.
Scarcely had I closed my eyes when someone knocked on the door.
No sooner did she complete one project than she started working on the next.
Remember that sooner is a comparative word and hence it should be followed by than, not when.
For example, with two adjectives, two adverbs, nouns, infinitives etc.