Disabling sound for a control and/or application?
Greetings.
I'm writing a vb.net 2005 application which has hidden webbrowser controls in it, in order to retreive data from a website.
The problem is that these websites have flash advertisments with music and sound, and I need to disable that sound so that people don't suddenly start hearing noises and not understand where they come from.
Is there any way I can disable sound for the webbrowser control, the form, or the application - without completely muting off the computer?
Thanks in advance,
-Elad
[545 byte] By [
Ambious] at [2007-12-24]
First off, thanks for replying.
I can't disable the sound in IE because the end-user may need it :-P
Maybe there's an alternative way to solve this, for example, is it possible to prevent a webbrowser control from loading ActiveX objects, and thus prevent it from loading those advertisements?
not entirely, I guess you would have to strip out the tags and what not when the document has been completely loaded using the Body inner and outertext
The webbrowser control is based on the core of IE so any settings in IE will be used in the webbrowser control.
Again, that would disable flash for the entire computer, I want to block it only for my application.
I guess I have no option but to 'strip' it from the document, I just hope it doesn't ruin the other data I need to retreive.
By the way - should I 'strip' it on the 'navigating', the 'navigated' or the 'documentComplete' event?
Yeah, I used the documentcomplete event but I did something even smarter. Instead of removing just the tags which bothered me, which was difficult, after reading the values I needed I just dumpted the entire document (wb.document.body.innerHTML = "") which of course solved my problem.
Thanks for all your help though :-)