WATERLOO, Ont. - A widespread shortage of information technology graduates across North America is forcing Microsoft Corp. and other software companies to look to developing countries such as China to meet their needs, Microsoft chairman Bill Gates says.

"When we want to hire lots of software engineers there is a shortage in North America - a pretty significant shortage," Gates said Thursday in an interview.

"We have this tough problem: If you can't get the engineers, then you have to have those other jobs be (relocated to) where the engineers are."

Gates was at the University of Waterloo, which has historically been a favourite hiring ground for Microsoft, on Thursday to deliver a speech to students about the state of developing technology.

But Gates also told the students that IT jobs are in high demand.

"It's partly that the enrolment in the field is going down," he said afterwards.

Enrolment in the computer sciences program at the University of Waterloo tumbled 5.1 per cent last year compared to 2006. Overall, the school saw 408 freshmen students join the program from 430 a year earlier.

University representatives said the enrolment numbers still are higher than similar programs at other North American universities.

The shortage of talent "is one of the reasons why we opened an office in Vancouver," Gates said.

Microsoft has a strategy of tapping into a global market for technical talent by setting up development centres in multiple locations.

The Vancouver location, about 200 kilometres north of Microsoft's headquarters in Redmond, Wash., has the advantage of being close to the company's main development area, but outside the United States.

"The Canadian government makes it easier to bring in smart people from various countries and create a group that's both Canadians, Asians, Europeans working together on software," Gates said.

Industry watchers have pegged the period after the 2000-2002 technology downturn as the time when students began to move away from computer-oriented jobs in fear that the sector would be bogged down with layoffs.

But the opposite happened, said Amy Parlous, executive director of the mathematics department at University of Waterloo.

"IT is just so pervasive in every sector now it's certainly not in one pocket. It's in public policy, it's in education, it's in health - it's everywhere, so there are more jobs," Parlous said.

Turning that trend around appears to be the greatest problem, especially since statistics suggest the country the hole left by retiring tech workers is only speeding up the shortage.

A recent report by the Conference Board of Canada suggested that the country will need 90,000 IT workers within the next five years, in part to fuel the explosion in wireless and Internet businesses.

Each position that isn't filled will cost the economy an estimated $120,000 per year.

Gates suggested that teenagers could gain interest in programing jobs by incorporating technology into their own lives.

"If you wanted people to go into a job area you could make sexy products like IPods and Xboxes," he said.

"We've done those tactics and they seem to be working in China and India."

During his speech Gates showed his lighter side by screening a documentary-style short film in which he pokes fun at his retirement alongside celebrities like rapper Jay-Z and U2's Bono.

He also fielded questions from students and recalled when he went to university in "the Dark Ages" and learned about computers on his own time.

"Fortunately for all of you, you're in a generation where all of these courses are going to be online and basically free. I'm taking solid state physics from MIT, though MIT doesn't know it," he said.

"You are far more empowered in terms of your ongoing education than any other generation has ever been."

Gates also criticized the United States government for its strict adherence to the H-1B visa, which allows American companies to bring in skilled workers from other countries temporarily, as long as they fall under a list of "specialty occupations."

Gates called the visa the "worst disaster."

The rules are strict and only apply to highly specialized workers.

"If I could just change one law in the U.S. it would be this," he said.

"There should be a free-flow of talent from the U.S. to Canada and Canada to the U.S. There's bright person who wants a job - it shouldn't be hard to go across the border and do that. We should make it as seamless as possible."