Re: Enable/Disable system sound. by Fabio
Fabio
Thu Mar 06 13:33:05 CST 2008
System sound for me would be the whole device capability of playing sounds,
including songs, videos, notifications...
Right now I'm using the volume control, saving the initial volume and
setting it to 0 to mute the device, but the sound is still enabled.
What I'd like to do is toggle it on and off without changing the volume.
I know there is an on/off switch on the sound control displayed on the menu
bar, but I don't know how to change it programatically.
Fabio
"Paul G. Tobey [eMVP]" wrote:
> What's "the system sound"? It sounds to me like what you're already doing
> is fine. If you set the system sound level to 'off' when your program
> starts, that doesn't prevent the user from adjusting it manually again any
> time during the run of your application. If you, when your application
> exits, check the current setting and, if it's 'off', set it back to what it
> was before your application started, that seems like a perfectly fine
> solution.
>
> Paul T.
>
> "Fabio" <Fabio@discussions.microsoft.com> wrote in message
> news:2994E351-0818-47B4-A58D-39FFCDF94AF2@microsoft.com...
> > Hello.
> >
> > I'd like to programatically toggle the system sound.
> > Right now, I change the device volume whenever I need to enable or disable
> > the sound, but I'm not very satisfied with this solution. I don't want to
> > prevent the user from changing the volume or the sound settings, I just
> > want
> > to be able to toggle the system sound on and off when my application is
> > running.
> >
> > Thanks in advance.
>
>
>