Not possible with standard .NET shells. Reject the path using the FileOk event.
If you can count on your program running in Vista and later, you might consider using the CommonFileDialog class in Code Code for the Windows API. It has a FolderChanging event that can be undone.
source share