I'm new to programming .NET for AutoCAD, but have experience with .NET and AutoLISP.
My question is I have two nested loops in which the user first makes a single selection which then puts him in the inner loop where he select objects at will until he is done and the either presses the escape key or right clicks with his mouse. This then puts him back in the outer loop where he can select another single item and enter the inner loop again or press escape or right click to end the program.
How can I catch these two events in .NET?
I am using the GetEntity method and found that both a right click and an escape generate an error situation that I can trap. I then checked the error number and with an "If... Then... Else..." exited the loops as required.