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 8536031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:34:16+00:00 2026-06-11T10:34:16+00:00

My declaration goes: Private Declare Function PlaySound Lib winmm.dll Alias PlaySoundA (ByVal lpszName _

  • 0

My declaration goes:

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName _
As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long

I’m using the code:

PlaySound Text2.Text, 0, &H1

Text2 is a textbox on my Form that I’m using to experiment with different sound aliases.

It works well for Windows default sounds (aliase such “SystemAsterisk”, “SystemStart”, “WindowsLogOn”, “DeviceConnect”, etc…), but how can I make my app play Explorer sounds?

In the registry, default sounds are stored like this:

HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\DeviceConnect\.Default

If I pass “DeviceConnect” to the Playsound function, it plays the right sound. But how can I reach sounds that are stored in other branches of the tree? For example:

HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\Navigating\.Default

I googled for hours, but still no solution. Thanks a lot for your help!

Davide

PS: I know I could just copy the sounds I want into my application folder, but I’m trying to tick to a single executable file for easier distribution.

  • 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-06-11T10:34:16+00:00Added an answer on June 11, 2026 at 10:34 am

    The Navigating example you have is an application-specific sound. Unfortunately, the SND_APPLICATION flag that you can pass to the PlaySound() call will only work with your application.

    There are a couple of ways to play this sound in your own application:

    • Read the filename from the registry and play the sound as a file.

    • Create your own application-specific definition in the registry (copying the filename from the Explorer reg key) and use the SND_APPLICATION and SND_ALIAS flags to play it. You will have to set the reg value every time your program starts if you always want it to match the Explorer version.

    • Since you don’t want to include multiple files with your program, you could embed the sound as a resource in the application and use the SND_RESOURCE flag to play it. I’ll note that if the user changes the Navigating sound in the Control Panel, your sound won’t match if you do this.

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

Sidebar

Related Questions

I've got a C# extern declaration that goes like this: [DllImport(something.dll)] public static extern
For declaration perspective the following is allowed IList<string> list= new string[3]; list.Add(Apple); list.Add(Manago); list.Add(Grapes);
I have the declaration (or similar) std::map< std::string, Stock*> &stocks; throughout my code. Eclipse
Possible Duplicate: Why does second function declaration win even though I return before it?
The current declaration of SendMessage over at PInvoke.net is: [DllImport(user32.dll, CharSet = CharSet.Auto, SetLastError
I came across the following difference related to function definition/declaration between C and C++.
In javascript, What is the difference between function declaration and function expression in terms
Declaration;) MKMapView mapView; I can't found the difference between mapView.userLocation.location.coordinate and mapView.userLocation.coordinate. Is there
declaration of textfield1 <td nowrap=nowrap><input type=text name=textfield1 id=textfield1/></td> trying to return the value entered
Declaration: I am not sure if that is a parameter. Please enlighten. I have

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.