What you likely have are fungus gnats, that look and behave an awful lot like fruit flies. Their larva do indeed thrive in moist potting soil. I've never heard of the powdered glass idea, but I'd be leary of using it, or trying to re-pot something after using it.
If you let the surface of the soil in the pots dry out between waterings, that will decrease the numbers quite a bit. Similarly if you cover the surface of the soil with fine gravel, it stays too dry for the fungus gnats to successfully lay their eggs.
I still get the odd gnat around, but not as many as I used to. And they are fairly harmless, from what I've heard.