Friday, 15 March 2013

.net - How to switch on narrator when form load occurs on c#? -


Stop describing when I load my form 1 and when the form closes, when I turn on Windows Nunator Want to

I went through the above link but did not help. Make sure my requirement is not the string of speech.

Please help.

Event Hook In the Creator, Start Your Synthesizer Start the speech asynchronously on the Load Event and then discard the speech at the form-closing event and dispose of your Synthesizer:
  Using the system; Using System.Collections.Generic; Using System.Linq; System Using Speech Synthesis; Using System.Windows.Forms; Namespace WindowsFormsApplication1 {Public Partial Speech Form SpeachForm: Form {SpeechSynthesizer _synth; Public SpeachForm () {InitializeComponent (); _synth = new speech synthesizer (); } Private Zero SpeachForm_Load (Object Sender, EventArgs E) {// Audio output Configure _synth.SetOutputToDefaultAudioDevice (); // Speak a string Var msg = "The text you want to say."; _synth.SpeakAsync (MSG); } Private Zero SpeachForm_FormClosing (Object Sender, FormClosingEventArgs e) {_synth.SpeakAsyncCancelAll (); _synth.Dispose (); }}}   

This form is said by any other means:

  var frm = new SpeachForm (); Frm.ShowDialog ();    

No comments:

Post a Comment