Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6344963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:44:10+00:00 2026-05-24T20:44:10+00:00

I have a program written in Delphi XE that plays a WAV file using

  • 0

I have a program written in Delphi XE that plays a WAV file using TMediaPlayer. The program runs in the system tray on a Windows 7 computer. The program waits for an event to trigger playing the wav file. If I am logged in on the computer itself, the wav plays fine. But if I lock the computer terminal (or log in through Remote Desktop), the wav file does not play through the computer speaker. I know the event is being triggered because all the other code in the event handler works just fine; it’s just that you can’t hear the wav file. I have hard-coded the volume to the maximum level so I know it’s not a volume problem. Does Windows 7 have something that prevents sounds coming through the speaker if no one is currently logged in to the computer? If that limitation exists, is there a way around it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T20:44:11+00:00Added an answer on May 24, 2026 at 8:44 pm

    As Brad suggests, use PlaySound() instead of TMediaPlayer. It works fine when the the machine is ‘locked’. Not sure about it working over a remote desktop connection though.

    To confirm this, I created a new app, put a TTimer on the form, set the Interval property to 20000 and put this code in the OnTimer event:

    procedure TForm13.Timer1Timer(Sender: TObject);
    begin
      PlaySound('c:\windows\media\tada.wav', 0, SND_ASYNC or SND_FILENAME);
    end;
    

    Then I ran it, locked the console (with Windows L), and waited 20 seconds. The sound played successfully.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program written in C that runs on Linux, MacOS and Windows.
I have a Windows Service written in Delphi which runs a number of programs.
I have a console program written in C# that I am using to send
I have an application written in Delphi 2006 that was working fine in Windows
I have a program written in VB.NET which stops a service that uses file
I have a program written in the Delphi Programming Language that I have to
I have a program written in python that uploads an archive (zip file) to
I have an OpenGL program (written in Delphi) that lets user draw a polygon.
I have a classic client/server (fat client and database) program written in Delphi 2006.
I have a program written in VB.Net (Visual Studio 2008) that uses a DLL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.