I think you have to become a Businessman of some Sort.
Bill Gates did not become rich because of MS-DOS, he got rich because his Business-Deal with IBM. The guys who did Google, YouTube or Fecesbook did not become rich because they made good software, because they sold their software to bigger companies at some point or went to the stock exchange themselves.
So yeah, you need to have someone for the business side. And then, you need an idea. Bonus points if you live in a country where some new trends did not fully arrive yet. For example, Facebook may be HUGE in the US, but in Germany they are nowhere near StudiVZ. YouTube is big in many countries, but in France, DailyMotion got a good spot as well as they did target the French market specifically.
So if you live in a country where a recent trend did not yet fully hit, you can get rich by taking a good idea, making a clone specifically targeting your country and then sell it later, but you need a businessman in addition to a programmer.
You can also get rich by another type of Application programming. Do you know that every time there is a bank transactions, they are rounded and small fractions of a penny are simply lost? You can get rich by programming a tool that takes all these fractions of a cent and puts them on a secret bank account on some offshore bank.
Possibly the most reachable way to get rich: Work for a company that pays huge bonuses and make sure you get it.
Or start your own company, make a kick ass app and start selling it for some years, but then you also need Marketing/Customer Service/Sales.