HI.
I'm wanting to break a continuios loop (in a VB.net dll application that has no GUI forms), when a user hits the escape key. How do I go about listning for the the escape button being pressed.
Cheers
Phillip
|
HI.
I'm wanting to break a continuios loop (in a VB.net dll application that has no GUI forms), when a user hits the escape key. How do I go about listning for the the escape button being pressed.
Cheers
Phillip
you could try comething like
as demonstrated hereCode://did user press ESCAPE? if (HostApplicationServices.Current.UserBreak()) { throw new Autodesk.AutoCAD.Runtime.Exception( ErrorStatus.UserBreak, "ESCAPE pressed"); }
http://www.theswamp.org/index.php?topic=29992.0
/// kdub
How can this be used in VB.NET and how would it actually break a loop? Is this placed in the
"Do Until ..." Statement
... or just placed somewhere in the middle of the loop. How would this react with a transaction in progress?
Hi,
Code://did user press ESCAPE? if (HostApplicationServices.Current.UserBreak()) { throw new Autodesk.AutoCAD.Runtime.Exception( ErrorStatus.UserBreak, "ESCAPE pressed"); }
I just tried to add the statement with the HostApplicationServices above to my .NET VB addin running on Acad 2008.
But I'm unable to find the given call to the UserBreak().
Where can I find it?
Greetings
René