Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Cancelling a background worker

Cancelling a background worker

Scheduled Pinned Locked Moved C#
algorithms
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Muammar
    wrote on last edited by
    #1

    It's me again:-O I'm having a lot of trouble today:sigh:

    backgroundWorker1.CancelAsync();
    

    I'm using the do work method for searching and it just refuses to cancel:confused:


    Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

    H 1 Reply Last reply
    0
    • M Muammar

      It's me again:-O I'm having a lot of trouble today:sigh:

      backgroundWorker1.CancelAsync();
      

      I'm using the do work method for searching and it just refuses to cancel:confused:


      Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

      H Offline
      H Offline
      Hessam Jalali
      wrote on last edited by
      #2

      you must first set the WorkerSupportsCancellation Property of BackgroungWorker instance to true. then you can cancel it good luck :)

      M 1 Reply Last reply
      0
      • H Hessam Jalali

        you must first set the WorkerSupportsCancellation Property of BackgroungWorker instance to true. then you can cancel it good luck :)

        M Offline
        M Offline
        Muammar
        wrote on last edited by
        #3

        Hessam Jalali wrote:

        you must first set the WorkerSupportsCancellation Property of BackgroungWorker instance to true.

        C'mon, I might have screwed up a bit lately but I'm not that stupid:doh: OF COURSE I DID! Yet, it's not working:~ Thanks anyways Hessam:->


        Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

        H 1 Reply Last reply
        0
        • M Muammar

          Hessam Jalali wrote:

          you must first set the WorkerSupportsCancellation Property of BackgroungWorker instance to true.

          C'mon, I might have screwed up a bit lately but I'm not that stupid:doh: OF COURSE I DID! Yet, it's not working:~ Thanks anyways Hessam:->


          Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

          H Offline
          H Offline
          Hessam Jalali
          wrote on last edited by
          #4

          really sorry, I didn't mean that ,I make these type of careless mistakes alot myself can you send some code?

          M 1 Reply Last reply
          0
          • H Hessam Jalali

            really sorry, I didn't mean that ,I make these type of careless mistakes alot myself can you send some code?

            M Offline
            M Offline
            Muammar
            wrote on last edited by
            #5

            Oh, dont be hard on yourself young man:) Thanks for helping:):rose:


            Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups