Ok, looks like the laws NavyLT quotes do indeed make it technically impossible to buy a gun. But I could still be given one, so far as I can tell, and open carry legally in a state like New Hampshire, or even concealed in one like Vermont. Whether it would cause me no end of hassle, as you say, well, it very well might. But so far as I can tell, it is technically, legally possible for a foreigner to open carry on a tourist visa.
Also, it seems like there's a mismatch in the laws. To me, it reads like the exemption I quoted is an earlier law and when the requirement for FFLs to know state residency was introduced they forgot to add an exemption for that.
One final thing is, consider what would happen if you needed to defend yourself in that situation, do you have the training required to deal with the situation without lethal force, or are you prepared for the consequences should you actually use the firearm you have? Remember that you have limited constitutional rights, and not everywhere will view you acting in self defense as appropriate given the hoops you jumped through to be armed.
I was a pistol shooter for years before the handgun ban in England, and served in the army where we did a little pistol shooting. I also travel to Switzerland every so often to shoot my pistols there (when the ban came, I had them shipped there for storage rather than turn them in to be destroyed).
Oh....now there's an idea! I could bring in a handgun that I legally own in Switzerland, for hunting - say, my Colt Delta Elite or Glock 20 - suitable for deer hunting I should think? I think I read the provisions for that (bringing in a gun for sporting purposes) somewhere, will look them up. Then once I'm there, in a state like Vermont, there's no law against me carrying that gun in a holster down the sidewalk or into the grocery store?