Typically the bank does not go to the property and change the locks (lock you out) unless they have been by and see that the property has been abandoned. It it appears to have been abandoned, then they will do this. Even after that happens, you can still go back into the house if you want, until the foreclosure sale actually happens.
The bank CAN postpone the sale for years, as they appear to have done in your case, and continue to report the delinquency on your credit. Honestly, aside from the question of whether or not the "lock-out" was appropriate, everything else they have done appears to be perfectly legal. Not ethical, but legal. You should also look into whether or not there was an HOA ... if there was, you may have a giant HOA bill out there too as those obligations remain yours until the foreclosure is done.
Douglas Edmunds is in the business of helping people and companies file for bankruptcy protection. The bankruptcy code requires that I call my firm a "debt relief agency." Any answers or information provided is for general information purposes only and is not intended to be a legal opinion, legal advice or a complete discussion of the legal issues. This is not intended to create a attorney-client relationship. Each individual's situation is different and you should seek independent legal advice from an attorney familiar with the laws of your state for specific information.