I have heard that in countries where malaria or dengue fever are endemic, local residents have built up resistance to the diseases so that contracting them is rare or impossible. Is this true, and is it possible for long-term travelers or expatriates to build up resistance?
Hippietrail suggested making this a full answer, so here you go:
For dengue, the answer is emphatically no. There are four strains of dengue fever, and while getting one of them confers life-long immunity to that strain, each successive infection with dengue of a different strain carries with it a considerably higher risk of either dengue haemorrhagic fever or dengue shock syndrome. You really, really don't want either one. This, incidentally, is why you won't be seeing a vaccine for dengue fever for quite some time - researchers are justifiably concerned that unless they can confer 100% immunity for all four strains, the vaccine will actually increase the risk for severe disease.
For malaria, its something of a harder question based on a number of different factors, but its not something I would ever count on over malaria prophylaxis, even if you were staying very long term.
Anecdotal evidence I have been told by various friends and acquaintances who had dengue in the past several years in Mexico is that dengue gets worse each time you catch it leading to dengue haemorrhagic fever when you get it the third time.
I'm pretty sure this is not accurate scientifically though. Read up and ask a doctor to be sure.
In any case you can catch it multiple times and it won't get milder each time.
As for malaria there are multiple species (and probably strains) of the parasite which vary greatly in their severity and risk of relapse so I would assume that having contracted one would not give you immunity to the others as the very minimu. I would suggest again reading up online and asking a doctor if this is a risk you are likely to actually face.
The only time I was in a malaria area was in on the coast of Honduras about five years ago and I seem to remember the (very poor) locals telling me they also have to take antimalarials in the dangerous season. Since it turned out I was not there during the dangerous season I did not use most of my medicine. But that's just me - don't copy me!
Again I am not an expert on mosquito borne diseases. This is mostly stuff I've heard from people in my travels with a bit of Googling to back some of it up. For real advice check with a health professional.
While I have not heard of any resistance to dengue being developed, there have been studies done over years on genetic resistance to malaria. Note that this is genetic resistance that builds up over many generations, and has been observed in specific tribes or ethnic groups. You aren't going to develop resistance simply by travelling a lot and it would be unwise to forego standard precautions.
That said, what I think you're really referring to is general 'resistance' to mosquito bites (from normal, non malarial / dengue vector mosquitoes) that you'll develop if you travel / stay in those regions long enough. You learn to live with it.