Joined: 20 Dec 2007 Posts: 2227 Location: Me.Location;
Posted: Fri Dec 24, 2010 4:37 am Post subject: [VB.NET] Mute Windows Media Player and VLC and Firefox etc
I was just wondering, is it possible to mute WMP/VLC/Firefox using VB .Net 2008/2010?
I don't mean add a control into my form and make that mute, I mean mute the actual external program.
Thanks. _________________
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
Posted: Fri Dec 24, 2010 2:34 pm Post subject:
You can mute Windows Media Player using SendMessage. (Or COM if you feel like dealing with that disaster.)
WM_COMMAND with 0x00004981 as the wparam will send the mute message to the player.
(You can use Spy++ to get these values.)
For Firefox it would more or less so depend on what is playing the sound/music. You can specifically mute Firefox if you have Vista/Win7 as Slov said, or you can attempt to find the inner child in the browser that is playing the sound and mute that.
For VLC you can use Spy++ to find the control name/id of the mute button and use SendMessage to press it as well. Or if it has a WM_COMMAND or WM_USER equivalent you can use that as well. _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum