Yes you can, however it can take up to 7 years! With that said if you are in foreclosure it would be a good idea to list you home with an agent that is an expert in short sales in efforts to avoid the full 7 year wait. We have agents in my office that are experts in short sales.
If you home is sold prior to foreclosure in a short sale you should be able to purchase a home in 2-3 years. That is as long as you keep all your credit in good standing.
Windermere Central LLC
The other answers are correct, I would like to add that it might be possible to shorten the time frame by taking other actions, such as a Short Sale. Where are you in the foreclosure? Have you just been noticed? If so we might have time to do a Short Sale of your home and it will do less damage to your credit.
Just an idea to explore? No cost to you and it's better for nearly everyone. What do you think of that?
Even with a foreclosure on your credit report, you will be able to buy a house in the future. Right now, it looks like you would have to wait 4-5 years before you be eligible. But it's all subject to change!
Can we help you with any other questions?