Garrys mod flashes then exits

When I try and start Gmod the window outline appears for a second then goes away it never goes any further then that. I have tried reinstalling the game but I am still unable to play. any ideas?

edit: Just found a similar thread with the solution