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
H

Husnul karim

@Husnul karim
About
Posts
2
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How i can pause/resume a thread in window form application ?
    H Husnul karim

    I am developing an window form application, in which i am playing an audio of wave format, and want to convert that pre recorded speech or audio into text format(using speech api) and display that text in the label. I started a thread for audio to text conversion in the play button, now i want to pause that thread on the pause button(means how to pause a that thread). I used ManualEventReset method. but in the pause button when i am using signal.waitone() methods. this freez the whole form. please help.some parts of my code is given here. //pause button

     ManualResetEvent signal = new ManualResetEvent(false);
    
     ManualResetEvent signal = new ManualResetEvent(false);
    

    private void buttonX15_Click(object sender, EventArgs e)
    {
    method_pause();
    }

    public void method_pause()
    {

           clip.Pause();
           visular1.Stop();
           visular2.Stop();
           visular3.Stop();
           visular4.Stop();
           visular5.Stop();
           this.pause.Hide();
           signal.WaitOne();
           play.Show();
       }
    

    private void play_Click(object sender, EventArgs e)
    {

          playsub();
          labelX1.Text = "Play";
       }
    

    public void playsub()
    {
    starter = delegate { subt(FName); };
    thread=new Thread(starter);

            try
            {
                thread.Start();
                method\_play();
    
            }
           catch(Exception ex){}
    
       }
    

    from where i can set the thread.

    C# json help tutorial question career

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

    C# help career
  • Login

  • Don't have an account? Register

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