I ran across an interesting error with regards to the button tag.
Because I need to monitor the state of the button, I am setting the tag to "ON" and when the button is clicked, I change the tag to "OFF". This way I can do different things in the event handler based on the previous state.
When I initially wrote the code, I got an error that I couldn't use "==" to compare Tag to "ON". The suggestion was to us "Is", thus the comparison would be:
button.Tag Is "ON"
I guess that's ok, but I wanted to be sure I was comparing correctly so I decided to use the ToString() method .. well, apparently AutoCAD doesn't like that.
button.Tag.ToString() == "ON" compiles just fine, but it throws a fatal error. Stepping through the code verified it.
Oh well ... I'll go back to the "IS" comparison.