Get A New CommandLineArgs?
Apr 1, 2012I am making mp3 player. i associated .mp3 filetype it works great with [code]...
View 1 RepliesI am making mp3 player. i associated .mp3 filetype it works great with [code]...
View 1 RepliesI have referenced this thread and the website it points to:pening a file in my application from File ExplorerAs of now, I can't get My.Application.CommandLineArgs to work properly. Any time I select an file to open in my program I get a windows error forcing the program to close. I only want to get the file path from My.Application.CommandLineArgs and pass it to a function that will then parse the file (a text file of various extensions, even if it is not associated with my program) and display the contents in a RichTextBox.My function to open the file is complete and works, but if I try to use My.Application.CommandLineArgs on a file the program crashes immediately.here is the code I'm trying as a test:
Private Sub ParseCommandLineArgs()
If My.Application.CommandLineArgs.Count > 0 Then
MessageBox.Show(My.Application.CommandLineArgs(0))
[code].....