King Charles said messages of support had "reduced me to tears", as he was seen for the first time back on official duties since revealing his cancer diagnosis.
He was meeting Prime Minister Rishi Sunak, who said: "Wonderful to see you looking so well."
"It's all done by mirrors," the King joked, lightening the mood.
The King told Mr Sunak that he had been very moved by all the cards and good wishes that had been sent to him.
The monarch shook hands with Mr Sunak as he arrived for the Buckingham Palace audience on Wednesday afternoon, with both doubtlessly aware of the public scrutiny of the King's health.
Looking relaxed and wearing a blue pinstriped suit, the King sat down with the prime minister in the ornately decorated Audience Room, surrounded by photos of his royal relations and a painting by Canaletto of the Thames.
While he receives treatment the King has stopped carrying out public visits, but he is continuing with his duties as head of state, such as this regular meeting with the prime minister.
Mr Sunak was filmed arriving and the King told him how much he had appreciated all the messages he had received and his admiration for cancer charities.
"I've had so many wonderful messages and cards, it's reduced me to tears most of the time," said the King.
But the rest of the meeting with the prime minister, which lasted about 45 minutes, was held in private as usual.
The King has previously been seen heading to church in Sandringham and being driven to and from Clarence House in London, but this was the first sight of him in such a formal setting since his cancer diagnosis was announced more than two weeks ago.
King diagnosed with cancer, says Buckingham Palace
King seen for first time since cancer announcement
Timeline of the King's health treatment
Earlier this afternoon, the King attended the monthly meeting of the Privy Council, a body of advisers to the monarch, mostly made up of senior politicians from the House of Commons and House of Lords.
Since his diagnosis with an unspecified type of cancer, the King has been receiving treatment as an outpatient.
He has continued with the administrative side of his role, such as dealing with government papers in their red boxes and signing documents.
But he has stepped back from the round of royal visits where he would usually meet the public or attend events.
Wednesday's meeting with Mr Sunak was the confidential audience between the King and prime minister, usually held each week.
The meeting is a traditional opportunity for the politically-neutral monarch to talk about current affairs of state with the prime minister of the day.
Previous prime ministers have spoken of these meetings as a chance to talk about ideas outside the usual party political pressures.
Edward Heath, Conservative prime minister in the 1970s, said of his meetings with Queen Elizabeth II: "It was always a relief to be able to discuss everything with someone, knowing full well that there was not the slightest danger of any information leaking."
Labour's Harold Wilson, who was said to have got on well with the late Queen, had meetings that grew longer, stretching on occasion to two hours.