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




Answer this question

Disabling sound for a control and/or application?

  • Magic PC

    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



  • Jason Zhang

    I don't think you can to be honest, you could try "My.Computer.Audio.Stop()" but I doubt that would work or maybe disable the sounds playing in the Internet Explorer options.

  • Robin Debreuil

    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 :-)



  • Gascho Rempel

    documentCompleted event

  • Hector Guerrero

    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



  • KipK

    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.



  • XNA Rockstar

    Start + Run, regsvr32 -u c:\windows\system32\macromed\flash\flash.ocx

    If that doesn't work, restore the flash player by repeating the same command but now without the "-u" option.


  • Disabling sound for a control and/or application?