Female dogs are in heat twice a year, each time for around three weeks. Male dogs get very excited and stimulated during these times and will do anything to get at the female. If you have both male and female dogs at home and they are not neutered or spayed then the best idea is to keep them apart. If you have a male dog that smells females in heat while he is outside then keep a tight control on him at all times or he will try to escape to meet up with potential mates.
Neuter your male dog because this is the best way to control it around female dogs in heat. This simple operation has other benefits of reducing health problems and prolonging your dog's life. Neutering can also improve a dog's behaviour. Many vets recommend neutering for a range of reasons and it can certainly remove a dog's whining and general overexcitement around a female dog in heat. It will also reduce a male dog's desire to roam in pursuit of a female.
Train your dog not to behave aggressively around other dogs, such as barking loudly or growling. If the male dog is trained well enough it will follow your instructions and not exhibit mad behaviour around a female dog in heat. A lot of male dogs will get into fights with other male dogs over a female dog in heat. It is a natural behavioural tendency but, if you have trained your dog properly over time, he will obey you rather than fight another dog.
Keep your male dog on a leash when it is outside with you on walks. Avoid off-leash parks. Un-neutered dogs are more aggressive in general, even when female dogs in heat aren't around.
Separate your male dog from your female in heat if you have both in the same house. Keep one outside and one inside and then change after every few hours. If this is a problem, consider "giving" your male dog to a friendly neighbour or relative for the time the female is in heat. Alternatively, consider putting the male dog in a kennel until the female is out of season.
Use special dogs "pants" or sprays, developed to reduce the female dog's smell. The sprays are not very long-lasting though, so you should reapply frequently.
Keep your windows closed if possible because male dogs can sniff a female in heat from a distance of around three miles.
Make sure that your male dog does not sneak out of the house while your back is turned to pursue a female. Males will jump over fences to reach a female in heat.