In North Africa they paint their doors, shutters and frames blue and keep them shut. Helps most of times, but I'm not sure whether it is the painting or the closing.
Once upon a time I had a lazy dog, lying around idly on the sofa, who caught every fly passing his head near enough.