Q: I have a sunny window with a new pot of flowers nearby. I noticed lots of small, dark flies dying on the windowsill as soon as I brought the flowers home. Did the flies come from the flowers?
A: I think you have dark-winged fungus gnats. They live in very moist potting soil, feeding on the fungus that grows there.
To confirm the diagnosis, cut a 1/4 inch thick disk of Irish potato and place it on the soil surface. Fungus gnat larvae in the soil will collect on the underside of the potato. If you see tiny worms with a distinct dark head, you have dark-winged fungus gnats.
To gradually control them, let the soil dry between waterings. Water houseplants only when your finger, pushed two inches into the soil, comes back almost dry. Do not follow a calendar schedule; only water when soil is dry.
Sprinkle a one-half inch layer of dry sand on top of the potting soil. This will immediately discourage gnats from laying their eggs.
For a more immediate cure, drench the soil with diluted insecticide.