expression
no sooner than; as soon as; immediately after
Used after the past tense of a verb to express that one action happens right after another, often with a sense of surprise or unexpectedness. The second clause is typically in the past tense.
彼は家に着いたと思うと、すぐに出かけてしまった。
No sooner had he arrived home than he went out again.
雨がやんだと思うと、また降り出した。
The rain had just stopped when it started again.
expression
at the thought of; when I think about
Expresses an emotional reaction or realization that occurs upon thinking about something. Often used with verbs like 泣ける, 腹が立つ, 悲しくなる, etc. The preceding clause is usually in dictionary form or た-form.
あの日のことを思うと、今でも涙が出る。
Even now, I cry at the thought of that day.
彼の無責任さを思うと、腹が立ってくる。
When I think about his irresponsibility, I get angry.