schmeet
Member
- Joined
- Jul 19, 2010
- Messages
- 8
- Programming Experience
- Beginner
Hi,
I have an application with a function to save data to .nmp files. And I have a function to open them.
When I published the application (A clickonce app, deployed using Studio Express), I set up file association.
Now this works and when I click on .nmp files it opens my app. However, I can't get my program to open the files. The way I understand it, the file path of the file which was clicked is sent via My.Application.CommandLineArgs(0).
So I have the following code to call my open file function during the form load event:
However, nothing happens. Can anyone see anything particualrly wrong with this? Or does it just not work with clickonce apps?
Regards,
Pete
I have an application with a function to save data to .nmp files. And I have a function to open them.
When I published the application (A clickonce app, deployed using Studio Express), I set up file association.
Now this works and when I click on .nmp files it opens my app. However, I can't get my program to open the files. The way I understand it, the file path of the file which was clicked is sent via My.Application.CommandLineArgs(0).
So I have the following code to call my open file function during the form load event:
VB.NET:
If My.Application.CommandLineArgs.Count > 1 Then
'Program was opened by a file extension
LaunchFile = My.Application.CommandLineArgs(0)
Call OpenFileFromPath(LaunchFile)
End If
However, nothing happens. Can anyone see anything particualrly wrong with this? Or does it just not work with clickonce apps?
Regards,
Pete