Danny Fenton always knew. He's kept it secret since day one, too afraid to tell his friends and family. Who would believe him? No, it was better to keep it secret, and let his friends believe that he was okay. It was better for them to think he was just a freak kid with ghost powers.
Except he wasn't. The accident did more than give him powers - it took his life.