Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I wanted to play <pre><pre lang="vb">My.Computer.Audio.Play(My.Resources.welcome, AudioPlayMode.Background)
in TextChanged Event while AxWindowsMediaPlayer1 is currently having a video playback. I want to reduce the volume while playing the audio and after the audio has been played, it will return to the maximum volume.

What I have tried:

<pre lang="vb">AxWindowsMediaPlayer1.settings.volume = 30
        My.Computer.Audio.Play(My.Resources.welcome, AudioPlayMode.Background)
        AxWindowsMediaPlayer1.settings.volume = 100

But it throws an exception: Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown.
Posted
Updated 3-May-17 18:21pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900