Cancel long running function in AddIn

Hi,

one of the functions in my AddIn can run for a longer time. Users would like to be able to cancel the function (e.g. using Ctrl+Break as for Build.Cancel). How can I do that?

ciao

Stefan

[222 byte] By [smeuser] at [2008-1-7]
# 1
You could create a thread for that function. Then subscribe in your addin to the build.cancel event (whatever it is called) and then when that is fired by a cancel event just call a function that kills/stops/pauses that thread.

The build.cancel event will be something like: _applicationObject.Events.-something-

Dessus at 2007-10-2 > top of Msdn Tech,Visual Studio,Visual Studio Extensibility...

Visual Studio

Site Classified