C# WinForm RemoteApps

846 views Asked by At

I wrote a WinForm application that will be remotely accessed via RDP. I am having issues with the sound being transmitted to the client.

I am using the following to trigger a Beep. It is working as expected when I launch the app from my development box. However, when I access it via RDP, It is not beeping.

 Console.Beep();

I am wondering if there is a better alternative or anybody aware of a workaround.

1

There are 1 answers

0
Sam On BEST ANSWER

The solution was to directly play an audio file. I tried Console.Beepand System.Media.SystemSounds.Beep.Play with no luck!

 Console.Beep(); // It didn't work. 


 System.Media.SystemSounds.Beep.Play(); // IT didn't work either 


  // Playing directly a wave file produced audio. 
  using (var soundPlayer = new SoundPlayer(@"c:\Windows\Media\ding.wav"))
  {
    soundPlayer.Play(); // can also use soundPlayer.PlaySync()
  }