In case of BackgroundWorker, a cancel can be reported by the e.Cancel - property of the DoWork - event handler.
How can I achieve the same
There's Thread.Abort, which works by injecting a ThreadAbortException into the thread. It's a little risky because:
ThreadAbortException could happen on any line of code within it, even something innocent like i = i + 1You're better off coding your own signalling mechanism between your GUI thread and the background thread. It's hard to recommend something without knowing what's going on inside that thread, but where I have a thread that works by waiting on some object in a loop, I use an AutoResetEvent and wait on that too.