You can play around with this in a couple of ways. The idea in a complex sentence is that you have a "richer" sentence. A complex sentence "has an independent clause joined by one or more dependent clauses." This could make your sentence as, "After he became rich, he realized that he was not happy." Another way to frame it would be "When he is rich, it is clear that he is not happy."