Somebody broke into the house when they were playing cards.
While they were playing cards, somebody broke into the house.
While you were reading the paper, I was working.
When I was a child we lived in London
His parents died when he was twelve (NOT … while he was twelve)
I thought of it (just) when you opened your mouth.
While/When in Germany, he got to know a family of musicians. (=While/When he was in Germany …)