REDWOOD CITY, Calif. — Swell-looking home you’ve got here. Ever think about selling it? How about to me, right now?

That is increasingly the approach the house-hungry are using in Silicon Valley, where the number of homes on the market is so small that would-be buyers are driven to desperation. Their solution: seek out homes that are, in theory at least, not for sale.

Sue Zweig grew up in this working-class community, back when people said it was for the newly wed and the nearly dead. Not long ago, when she was out walking her dog, she began to realize things were different. A woman pulled over, asked about houses for sale in the neighborhood and ended up spending 45 minutes poking around Ms. Zweig’s living room and kitchen.

Her four-bedroom house was not on the market then, and it was not on the market a year or so later when another eager buyer showed up. This time, Ms. Zweig, a nurse, and her husband, Steve Zweig, made a deal for $1.375 million, a seven-figure profit over what they had paid in 1987. They moved out of the house last year.