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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:36:35+00:00 2026-06-14T23:36:35+00:00

I’ve made MP3 Files on my computer to associate with my media player. So

  • 0

I’ve made MP3 Files on my computer to associate with my media player.
So when i double click a MP3 file in the explorer, obviously the media player fires up and plays it.

My problem
I can prevent multiple instances popping up, but how can i transfer the file path of the new instance to the instance i am using already

What i want to happen:
I double click a song,… and im listening to it
I double click another song
and the current song should stop and new song should start playback, without popping up a new instance of the application.

I use Mutex to check whether there is already a running instance.
To get file path i use Environment.GetCommandLineArgs()

All I need is to pass the file’s path to the current instance. How can I do this??

  • 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-14T23:36:37+00:00Added an answer on June 14, 2026 at 11:36 pm

    Essentially you will have to build this into your application.

    When a user clicks a second song, you would have to have some way for the current instance to kill the previous instance of your application or send it a message.

    These seems a little dirty to me.

    I think a clean approach would be to write a small app_booter.exe that is associated with your media files. When a media file is clicked, it starts this _app_booter_ which :

    1. Looks for a running instance of your application.
    2. Send data to it to stop the current song and play this new one.
    3. If the app is not running, it just starts it with the song on the command line.

    To send your application data from this other exe you could take a look at IPC:
    Interprocess communication for Windows in C# (.NET 2.0)

    I think the WM_COPYDATA approach mentioned in the above post, or a tcp socket would suffice since your data is pretty simple, just a file path and maybe a command.

    I think keeping two separate exes will be easier and cleaner than building your app to talk to its previous instance.

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

Sidebar

Related Questions

I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want use html5's new tag to play a wav file (currently only supported
In my XML file chapters tag has more chapter tag.i need to display chapters
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.

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.