Television presenter Katie Ledger urged children at the John Mason School in Abingdon to dump the "losers and moaners" and latch on to winners.
The Channel 5 newscaster, a former pupil of the school, was guest speaker at its presentation evening, to celebrate a wide range of achievements.
After presenting certificates, shields and cups, Ms Ledger addressed the assembly and advised students to look to the future and not be deflected.
She said: "Keep looking ahead no matter what work you are doing at the moment.
"Be prepared to be flexible and attach yourself to winners. There are plenty of losers and moaners around, but there are also plenty of people with energy and motivation."
Ms Ledger cited her own experiences as an example of the way to get ahead.
She began work as a fitness instructor and had no connections with television. But her life changed direction when she was in Hong Kong.
"I walked into a television station one day and convinced the executives to give me a job presenting English language programmes, and I went on from there."
Headteacher Jeremy Cunningham spoke of the high points of the last school year, which included the best-ever overall GCSE results and a production of Les Miserables.
Former John Mason pupil Nikki Royle has received the mayor of Abingdon's cup and certificate for services the school.
Nikki,18, of Drayton Road, Sutton Courtenay, who is now studying bio-chemistry at Bath University, helped organise the school's library and learning resources computer centre.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article