I love the advice of Dr. Harvey Karp on how to get on a toddler's wavelength: : http://www.youtube.com/watch?v=G6KnVPUdEgQ&feature=re...
Once your little boy realizes you do care about what he wants, he's more likely to be able to calm down and cooperate with what you need from him. And there are lots of positive ways to approach this, rather than just saying no to a child. They hear no so often, and they can be so frustrated. So look for ways of saying "yes," and save "no" for those occasions when he might be doing something dangerous. Here are some tips that help:
1. Give him advance notice when you'll want him to be doing anything differently, especially when he's grooving on his activity/play. With my grandboy, we let him know at least a couple of times that a change is coming ("We're going to go to the store / have lunch / take a nap pretty soon." … and then a second alert one minute before making the change.)
2. Whatever the next activity is, make it sound as desirable as possible. Give some detail about the ride in the car, or a favorite food at lunch, or sweet snuggles before nap. Be positive and enthusiastic. And be calm. Desperation will show, and even though your son is too young to deliberately engage in a planned power struggle, he will quite naturally sense any cracks in your resolve. And this is where future power struggles truly can begin.
3. Get to know his most likely trouble-spots, and plan ahead. In your son's case, it sounds like this is when he wants something. Be prepared with a distraction – for example, another toy he likes when you have to take your cell phone away from him. Or a healthy treat when he wants a junky snack. Laughter, introducing a new game, a few twirls and bounces, hugs or tickles can help break into his obsession toward something he wants.
4. Avoid bribes, but let him work toward occasional rewards. Don't try to buy his cooperation with "If you'll do X, we'll let you have Y." Instead, phrase it as if he gets to assist in advancing something good for himself: "Hey, as soon as you help me get X done, then we get to do Y." It sounds like a small distinction, but it's important.
5. Be sure he gets lots and lots of physical activity during the day. If he has pent-up energy, it will have to come out some way, and that way is likely to add to both your stress and his.
6. Expect less cooperation if the child is tired, hungry, over-managed, overstimulated or bored. Toddlers have very little ability to choose other behaviors for themselves, and that's completely normal. We teach that to them gradually, and it works most effectively to do this by example, consistency, and noticing the positive.
7. Whatever you are trying to teach will need to be repeated hundreds of times over the next few years. Spanking and time-outs don't work for every kid, and will actually backfire sometimes. Consistent, calm reminders of what you DO want from him will work better than punishing for what you DON'T want him to do.
Little kids are just following their most natural inclinations, and experimenting with every automatic strategy possible to get their natural needs met.
There's a wonderful book that your son is just about growing into: How to Talk So Kids Will Listen, and Listen So Kids Will Talk, by Faber and Mazlish. As your child increases his ability to communicate, the wisdom in this book will make it a resource you reach for many times for reminders. It's the single most effective parenting book I've ever read, and I've read quite a few good ones.