Illinois Tool Works Inc. (ITW) swung to a first-quarter loss on write-downs and tax charges as the company's results were hurt by falling demand and the stronger dollar.

The bellwether maker of products ranging from fasteners to food-service and welding equipment also gave a second-quarter earnings view largely below analysts' expectations.

Shares were up 0.8% premarket to $31.40 as earnings from continuing operations edged past last month's warning. The stock is down 40% the past seven months.

Chairman and Chief Executive David B. Speer said Thursday the first quarter "represented historic challenges for our company' amid demand woes around the world. The sputtering economy has taken a toll on the industrial sector as customers sharply reduce orders. Illinois Tool cut its already weak first-quarter forecast in March, citing "significantly weaker" demand and the stronger dollar.

The company reported a net loss of $39.4 million, or 8 cents a share, compared with year-earlier net income of $303.6 million, or 57 cents a share. Excluding items from an accounting rule change and tax charges, earnings from continuing operations fell to 17 cents from 70 cents.

Revenue slid 24% to $2.91 billion, with nearly one-third of that due to the weaker dollar.

In early March the company slashed its forecast for earnings from continuing operations to 8 cents to 16 cents a share on a revenue drop of 22% to 26%.

Operating margin fell to 31.9% from 35.5% amid the sales woes.

For the second quarter, it sees earnings from continuing operations of 25 cents to 37 cents a share. Analysts surveyed by Thomson Reuters were on average expected 36 cents. It didn't update its 2009 outlook because of "ongoing broad-based weakness" around the globe.

-By Mike Barris, Dow Jones Newswires; 201-938-5658; mike.barris@dowjones.com