Thanks again klepto2. I still couldn't get your code working in my app, but I knew it should work. So I finally found the culpret. This line was causing the issue:
SetGraphicsDriver GLMax2DDriver()
I removed it from my setup code and everything is fine now. I don't know if this is a bug or not, but it was definately the problem. Now I can trap everything correctly. As soon as I put it back in, I get the same problems again. Go figure.
Thanks for all your help.
SetGraphicsDriver GLMax2DDriver()
I removed it from my setup code and everything is fine now. I don't know if this is a bug or not, but it was definately the problem. Now I can trap everything correctly. As soon as I put it back in, I get the same problems again. Go figure.
Thanks for all your help.