It depends on how you are doing it.
If you have the long operation running in the UI thread (ie, you haven't moved it to a separate thread already) then it will block the user interface from doing anything - so it can't respond to you mouse clicks or button presses. There is a way round that, by calling Application.DoEvents, but it is a very nasty solution, and can make response sluggish if you don't call it often enough, or make the processing much much longer if you call it too often.
A much better solution is to put the long operation in a separate thread - look at the
BackgroundWorker class[
^] - it's pretty simple, and the link includes a sample with a cancel button.
If you already have it if a separate task, then just cancel the operation!