you need to take the concealed carry class for your state. It will teach you all of the state laws, and when you can and can't shoot. It's probably a good thing that you didn't grab the gun, it's not worth it to shoot over property, and in most states is illegal to shoot over property. A firearm is a tool of last resort. Read through the posts in the tactics and training section of this forum, there's a lot having to do with scenarios such as yours.
especially this post:
http://www.thefiringline.com/forums/showthread.php?t=363439
This guy is probably going to go to jail because he decided to confront instead of call the police. If it's just your property on the line, then call the police, it's not our job to apprehend criminals, that's their job. Now if it's your life on the line, then that's a whole different story
Copy and paste that last post you posted, the story about what happened, and paste it in a new thread in the training and tactics category, asking for advice. You will get lots of feedback, and helpful advice from guys on here that probably have a lot more years of experience than I do, trust me it will be worth it, and only help you learn and progress.
I tend to spend a decent amount of time a week reading articles online, reading the training and tactics forum, reading my always changing state laws, talking to LEO's I know that hang out at my local range, just so if I ever have to face a situation where I have to use my firearm I will be more prepared for the aftermath, and have a better chance of avoiding court.
hope this post helps