I've seen the cartoons and blogs that ridicule the idea of having gun-free zones in public (and even private) areas. They satirically show or talk about criminals who decide not to attack a school because there is a sign saying something like "No guns allowed." To answer that unspoken question: no, anti-gun laws will not stop people intent on doing harm from bringing weapons into areas that have them banned. What these laws do is allow law-enforcement to stop and prosecute such individuals before they can carry out their plans.
Without gun-free zone laws, people (in some cases even students) with the intention of doing harm to students in a school can bring their weapons into the building, follow their targets anywhere in the school and, until they pull a trigger, not be able to be legally stopped or charged with a crime. Gun-free zone laws allow steps to be taken before someone is injured or killed. The news openly broadcasts whenever there is a school shooting, but leaves out the numerous times that such shootings were averted because the person with the weapon was able to be stopped, removed from the premises, and often incarcerated. Without such legal standing, such steps could not be taken without the school being sued.
Laws by themselves do not stop people from doing wrong. However, without those laws sometimes even reasonable actions to prevent someone from being harmed can't be taken.