The aircraft experienced a windshield deicing mechanism fire in the cockpit shortly after takeoff at 0719 Eastern time. Visual conditions prevailed for the Part 121 scheduled passenger flight. There were no injuries reported among the captain, first officer, flight attendant or 30 passengers; the airplane sustained minor damage. According to the flight crew, while climbing through 17,000 feet, flames and smoke started shooting out of the lower left windshield. The first officer turned off the windshield heat and the flames went out, but the smoke persisted. The captain declared an emergency and landed safely.