Don't think it would have made a difference here. I don't think he did this in a whim.
Not sure how i feel about gun control, but if killing a bunch of people is what he wanted to do, he's gonna be able to do it. Taking rights away to try and prevent this probably isn't the answer. People do dumb things out of fear, asking for more security and less rights is one of them.
I mean, i think if i really wanted to, i could think of a few ways to kill a bunch of people that didn't involve guns, or even explosives for that matter. Easy.
The problem is finding and preventing these sick people - like someone mentioned. Although i agree he would probably easily pass a test. Best chance for preventing this was having people close to him report him, and have him evaluated along with facts given by family members. Even in this case though I'm guessing the mom didn't think her son would ever come to this, and who would raise questions on their own son, who had a promising future and might have just been going through a dark time. Turning him in would possibly ruin his life (assuming that if she didn't, he would have straightened himself out)