D
Daniel B. Harwood
Using C# Standard Edition 2003 (a bargain!), I have
written a multi-threaded Windows forms application which
checks Web sites of interest for newly posted Web pages.
On detecting a new page it announces it using the Speech
API (mini tutorial on speech at bottom).
I opted to check each Web site with a separate worker
thread to prevent slow sites from bringing the whole
process to a grinding halt.
Unfortunately I appear to have hit a brick wall when it
comes to sites with frames as the InternetExplorer object
does not appear to support the IHTMLDocument2::frames
interface.
Despite extensive searching on MSDN and Google I can find
nothing on this. Can anyone confirm my finding above and
possibly offer a workaround?
I have found that if I embed a "Microsoft Web Browser"
control on the windows form, I can access the frames
interface. I suppose I could create multiple browser
controls at run-time, but...
Cheers,
Daniel.
Mini Tutorial - How to use the Speech API (SAPI) to say
something:
1. Add a reference to the "Microsoft Speech Object
Library" COM object to your project.
2. Add the following using statement to your code:
using SpeechLib;
3. Use the following code to say something (keep it
clean!):
SpeechVoiceSpeakFlags SpFlags =
SpeechVoiceSpeakFlags.SVSFlagsAsync;
SpVoice speech = new SpVoice();
speech.Speak("Hi there", SpFlags);
written a multi-threaded Windows forms application which
checks Web sites of interest for newly posted Web pages.
On detecting a new page it announces it using the Speech
API (mini tutorial on speech at bottom).
I opted to check each Web site with a separate worker
thread to prevent slow sites from bringing the whole
process to a grinding halt.
Unfortunately I appear to have hit a brick wall when it
comes to sites with frames as the InternetExplorer object
does not appear to support the IHTMLDocument2::frames
interface.
Despite extensive searching on MSDN and Google I can find
nothing on this. Can anyone confirm my finding above and
possibly offer a workaround?
I have found that if I embed a "Microsoft Web Browser"
control on the windows form, I can access the frames
interface. I suppose I could create multiple browser
controls at run-time, but...
Cheers,
Daniel.
Mini Tutorial - How to use the Speech API (SAPI) to say
something:
1. Add a reference to the "Microsoft Speech Object
Library" COM object to your project.
2. Add the following using statement to your code:
using SpeechLib;
3. Use the following code to say something (keep it
clean!):
SpeechVoiceSpeakFlags SpFlags =
SpeechVoiceSpeakFlags.SVSFlagsAsync;
SpVoice speech = new SpVoice();
speech.Speak("Hi there", SpFlags);