When you say 'will the old programs still work' do you mean after doing a clean install of Win7 and without reinstalling the programs? With any clean install all previously installed programs, regardless of where they are stored will need to be reinstalled. Installing programs adds entries to the likes of the Windows registry that will be lost by the clean install, so you will need to reinstall them. If you do an in-place upgrade to Win7 then as long as the program is Win7 compatible it should still work without the need to reinstall - although I don't think you can do an in-place upgrade from XP, so you would need to reinstall all your programs.
Mark.