Thousands of Vietnamese students climbed trees and pushed against barricades to give Microsoft (MSFT) founder Bill Gates a pop star's welcome in Hanoi on Saturday.

The world's richest man is on a one-day visit to the impoverished Southeast Asian country, which has the highest rate of fake software sold in the world, according to trade groups. With annual per capita income of $640, few can afford Microsoft packages and pirated versions sell for a dollar or two.

"I hope that one day I can be as successful as him," said Nguyen Trung Dung, 19, one of about 7,000 students who swarmed the Hanoi University of Technology to see Gates.

Gates and the Ministry of Finance signed an agreement on Saturday that makes it the first arm of the Vietnamese government to use licensed software in its systems.

A statement said the agreement "reaffirms the government's commitment in copyright protection as the country integrates into the international community." Vietnam wants to become a member of the World Trade Organization this year.

Gates, 50, received a standing ovation inside the university hall. Some students briefly clambered on the car carrying him as it left 90 minutes later for his next event.

Prime Minister Phan Van Khai and President Tran Duc Luong took time away from the ruling Communist Party National Congress, the most important event on the political calendar, to meet Gates. The eight-day meeting ends on April 25.

Khai, after outlining Vietnam's 20-year-long reforms that took it from a centrally planned economy to one driven by markets, told Gates: "I'm ready to listen to your advice."

The two also met last year in Seattle when Khai became the first Vietnamese Prime Minister to visit the United States since the end of the Vietnam War in 1975.

Economic analysts see education in technical skills and foreign languages, particularly English, as key to developing Vietnam's technology sector. About half of its 83 million people are under 30 years old.

Gates emphasized this point in his speech to the students.

"Now that the Internet has connected the world, some of the opportunity is not so much defined by geography but today it is much more determined by the educational investment you make."