0

I'm currently making a Media Player in WPF and C# (Visual Studio 2012), I've implemented all basics functions like opening video/music/image, it can be played or paused, the user can manage playlists, ...

Now when I want to use my application as the default player, I need to open the selected file at startup to launch the media. How to retrieve the file opened when I launch my application?

Filburt
  • 17,626
  • 12
  • 64
  • 115

1 Answers1

0

The file to open will be given to your program via command line arguments. Have a look for example here, it's a comprehensive discussion about retrieving/parsing the command line arguments for a c# program: Best way to parse command line arguments in C#? Or here: WPF Command Line Arguments, a smart way?

Community
  • 1
  • 1
Torben Schramme
  • 2,104
  • 1
  • 16
  • 28