I'm cursed with bad knees as well. Same thing - chronic dislocations and I agree, some of the worst pain you have ever experienced. I had surgery on the right knee for the first time while in college (tried the conservative routes up until then) and ended up having it repeated about 5 years later when it started dislocating again (last time at work - how embarassing!). Fortunately, the left one never went out as often, so I've been able to avoid surgery on it. However, not sure if I overcompensate with it, but I experience problems with the IT Band from time to time.
For me, the dislocations occurred primarily when I was kneeling/squatting down or sitting with my leg(s) folded beneath me, so I've learned to be careful when doing either. And, I also got to where I could tell when it was going to happen ... I'd feel that pull and immediately I'd try to straighten it back out to prevent it from happening. Didn't always work, but certainly kept it from happening more often.
I second the opinions others have expressed ... find a knowledgeable PT that can help you strengthen the quad muscles and try to avoid that surgery for as long as possible. I do appreciate the fact that it has given me another 6 years without too much constant fear of dislocations, but I also know that I gave up some strength in that leg as well as some stability.