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. How i can pause/resume a thread in window form application.

How i can pause/resume a thread in window form application.

Scheduled Pinned Locked Moved C#
helpcareer
4 Posts 4 Posters 2 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.
  • H Offline
    H Offline
    Husnul karim
    wrote on last edited by
    #1

    I am working on a project in which audio speech is converting into text format and displaying on lable. i want to pause and resume the thread by pause and resume button. please help , if any body know about that. i used manual reset event, but i freez window form when i press pause button. plz help1

    P S A 3 Replies Last reply
    0
    • H Husnul karim

      I am working on a project in which audio speech is converting into text format and displaying on lable. i want to pause and resume the thread by pause and resume button. please help , if any body know about that. i used manual reset event, but i freez window form when i press pause button. plz help1

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      How have you set up your thread? There are numerous ways of creating a thread, so we will need to know what you have done before we can answer this.

      1 Reply Last reply
      0
      • H Husnul karim

        I am working on a project in which audio speech is converting into text format and displaying on lable. i want to pause and resume the thread by pause and resume button. please help , if any body know about that. i used manual reset event, but i freez window form when i press pause button. plz help1

        S Offline
        S Offline
        Sascha Lefevre
        wrote on last edited by
        #3

        Did you create a worker thread for the conversion or do you use the UI thread for that?

        If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

        1 Reply Last reply
        0
        • H Husnul karim

          I am working on a project in which audio speech is converting into text format and displaying on lable. i want to pause and resume the thread by pause and resume button. please help , if any body know about that. i used manual reset event, but i freez window form when i press pause button. plz help1

          A Offline
          A Offline
          Abhipal Singh
          wrote on last edited by
          #4

          It looks like you are making you main thread sleep when you pause processing, and you end up hanging your UI. You need to have a separate thread for running your audio to text conversion code so that, you can pause that thread as an when required. (Hint: see System.ComponentModel.BackgroundWorker documentation) Please explain how your code works, may be then we will be able to help you better.

          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