He made the comments to two brothers who lost their parents in the 2004 Boxing Day tsunami, during a reception to launch an award for young leaders.
Rob and Paul Forkan were invited to the event at Buckingham Palace because their parents' deaths inspired them to build orphanages in developing countries funded by their Gandy's flip-flop manufacturing company.
Story continues after the video
The brothers, who were 17 and 15 when their parents Kevin and Sandra were swept to their deaths in Sri Lanka, survived by clinging onto the roof of a building.
They and their younger brother and sister had to hitch-hike across Sri Lanka to reach a safe passage home.
Rob, 26, told Prince William that his parents had given up jobs in the fashion industry to volunteer for humanitarian projects, which inspired him and his brother to set up Gandy's specifically to fund orphanages.
Rob told the Telegraph: "He said he lost his mum at 15 but there was always a silver lining and you should dust yourself off and carry on.
"He applauded what we had done and said keep up the good work. He's got his own family now - that was his silver lining."
The Duke and his brother Prince Harry were at the Palace to launch launch of the Queen's Young Leaders Programme, an award which recognises the achievements of young leaders in all 53 Commonwealth countries.
The awards scheme has been set up by the Queen Elizabeth Diamond Jubilee Trust, in partnership with Comic Relief and the Royal Commonwealth Society, to honour 60 people per year aged 18 to 29. It will run for the next four years.
The event included a royal first when the Princes became the first members of the Royal family to take part in a Google Hangout, appearing live via webcam from Buckingham Palace and chatting to five young leaders in Commonwealth countries around the world.
The brothers also posed for a selfie with young entrepreneur Jamal Edwards.
The Duke told them: "Always believe in yourself and don't give up on your quest."
More on Parentdish: