Malacca was founded in the 14th century, the centre of the Malay Sultanate. There were historical links with Singapore - the first Sultan of Malacca, Iskander Shah, was the last Sultan of Singapura. According to the Sejara Melaya, he fled Singapura when it was attacked by the Siamese and founded Malacca.
In the 15th century the Malacca Sultanate was a major power in the region, an entrepot state with a vast maritime trade.
In 1511 the Portuguese conquered Malacca and deposed its Malay rulers, but the city continued to be a flourishing centre of trade until 1641, when it was seized by the Dutch. As far as the Dutch were concerned, the centre of trade in the region was to be Batavia and the main reason for their occupation of Malacca was to kill of competition from a rival trading centre.
When France invaded Holland in 1795, the exiled Prince William of Orange issued instructions that all Dutch colonial possessions should be handed over to Britain for the duration of the war with France. The Dutch forces in the East Indies however decided to ally themselves with the French, and the stage was thus set for the British to regain control of the colonies.
Raffles second visit to Malacca in 1808 marked a turning point in his career. It was his report on Malacca, written while staying with Farquhar who was then Resident, which brought him to the attention of Lord Minto and subsequently led to his appointment as Agent to the Governor-General with the Malay States.
Raffles returned to Malacca with his wife and three sisters towards the end of 1810. Malacca was to be his base while he gathered intelligence in readiness for the proposed invasion of Java. In 1811, the British fleet gathered in Malacca and embarked in June 1811.
http://www.ncb.gov.sg/nhb/raffles/malacca.html
Pinang
After the Union Jack had been hoisted on the flagstaff, and the artillery and the ships had thundered out a salute, the proclamation was made that the island would in future be known as Prince of Wales Island, in honour of the Heir Apparent (afterwards George IV), whose birthday fell the next day, and that the capital would be known as Georgetown, out of compliment to the sovereign, George III.
Twentieth Century Impressions of British Malaya