VB.NET get path from the file the user opened

Patikol

I am developing a media player based on WMP. If the user sets my media player as the default player to play .avi files for example, then clicks a random .avi file, my player will start successfully, however it will not load the file that the user opened. So thats why I need a code that will get the path of the file the user opened, so that I can make the player load that file automatically after it has been started.

Jens

Use the My.Application.CommandLineArgs property. This gets you a list of commandline arguments. Launching a file from the explorer usually provides the path to the clicked file as the only argument, so use it like:

If My.Application.CommandLineArgs IsNot Nothing AndAlso _
   My.Application.CommandLineArgs.Count > 0 Then
    Dim UserFile As String = My.Application.CommandLineArgs(0)
    PlayFile(UserFile)
End If

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

VB.Net: Getting File Path from Data Files In Project

From Dev

get file path of already opened shelve?

From Dev

vb.net registry - get rid of full path from childnodes

From Dev

How to get folder path of file opened from OpenFileDialog in Visual Basic 2013

From Dev

How to get line number from a text file in vb.net

From Dev

How do i get one temporary path from 'System.IO.path.getpath' in vb.net?

From Dev

Exported excel file from datagridview shows error when opened VB

From Dev

How can I get file tile(name) from file full path in VB6?

From Dev

Get path+filename of file that was opened with my application

From Dev

How to get windows explorer full path of opened outlook MSG file?

From Java

Get file directory path from file path

From Dev

retrieve the range selected by the user in an Excel sheet opened via VB.NET

From Dev

Open file with VB.NET application (How does my project know which file is being opened?)

From Dev

VB.net Get DLL File Version

From Dev

get the downloading file size in vb.net

From Dev

Get file path from URI

From Dev

Get file name from path

From Dev

Get opened input stream from rest template for large file processing

From Dev

cannot insert path file address to mysql using vb.net

From Dev

File.Create(path) error VB.NET

From Dev

Trying to get a .xml file with vb.net, converting from CURL/PHP

From Dev

Use XmlReader to get a name and value from an XML File in VB.NET

From Dev

Get the values from dataset in vb.net

From Dev

file path in variable from user input

From Dev

vb.net get full path and filename of active excel workbook

From Dev

How to get server local drive path in vb.net?

From Dev

vb.net get full path and filename of active excel workbook

From Dev

Get VB.NET Relative \Upload path to the running application?

From Dev

How to get complete file name and path of file which is opened in java program?

Related Related

  1. 1

    VB.Net: Getting File Path from Data Files In Project

  2. 2

    get file path of already opened shelve?

  3. 3

    vb.net registry - get rid of full path from childnodes

  4. 4

    How to get folder path of file opened from OpenFileDialog in Visual Basic 2013

  5. 5

    How to get line number from a text file in vb.net

  6. 6

    How do i get one temporary path from 'System.IO.path.getpath' in vb.net?

  7. 7

    Exported excel file from datagridview shows error when opened VB

  8. 8

    How can I get file tile(name) from file full path in VB6?

  9. 9

    Get path+filename of file that was opened with my application

  10. 10

    How to get windows explorer full path of opened outlook MSG file?

  11. 11

    Get file directory path from file path

  12. 12

    retrieve the range selected by the user in an Excel sheet opened via VB.NET

  13. 13

    Open file with VB.NET application (How does my project know which file is being opened?)

  14. 14

    VB.net Get DLL File Version

  15. 15

    get the downloading file size in vb.net

  16. 16

    Get file path from URI

  17. 17

    Get file name from path

  18. 18

    Get opened input stream from rest template for large file processing

  19. 19

    cannot insert path file address to mysql using vb.net

  20. 20

    File.Create(path) error VB.NET

  21. 21

    Trying to get a .xml file with vb.net, converting from CURL/PHP

  22. 22

    Use XmlReader to get a name and value from an XML File in VB.NET

  23. 23

    Get the values from dataset in vb.net

  24. 24

    file path in variable from user input

  25. 25

    vb.net get full path and filename of active excel workbook

  26. 26

    How to get server local drive path in vb.net?

  27. 27

    vb.net get full path and filename of active excel workbook

  28. 28

    Get VB.NET Relative \Upload path to the running application?

  29. 29

    How to get complete file name and path of file which is opened in java program?

HotTag

Archive