For anything bearing weight, such as a pancake box for a fan - use 2"-3" pan heads. Drywall screws are great, IMHO, for mounting boxes for switches and outlets onto veritcal studs, but I wouldn't subject them to vibrations while bearing weight - if for no other reason, just the small size of the head looks bad from an engineering stand point.

It is kind of funny that most ceiling fans are actually held up by the two 8-32 screws going into the celing box, even though we take great measure to hold the box securely in place.