Yes. Bring the hand close very slowly, forefinger cocked... then....pow.
Other techniques I've employed: (1) cling film (saran wrap), (2) detergent spray (slows em down; dispatch after 2-4 rounds), (3) vacuum cleaner nozzle (they hunker down but are sucked in upon take-off)
Slow approach with a sheet 20-30cm wide held at opposite edges by both hands. The film being transparent the fly sometimes doesn't notice it. Also a convenient means of disposal.