1 I was resetting my password when my computer crashed.
My computer crashed while I was resetting my password.
2 We were searching the Internet when we saw the news.
We saw the news while we were searching the Internet.
3 My friend was playing on the games console when I arrived.
I arrived while my friend was playing on the games console.
4 They were trying to share a file when they deleted it by mistake.
They deleted a file by mistake while they were trying to share it.