-
I've been messing around with having a file open in my app when I dbl click on it. When I add the filename to the command line arguments in the the project properties, it worked fine, but when I compiled the app, an error came up saying 'Path not found', or something to that effect. So, being curious, I added value of Command to a listbox. When the app is not compiled, the value added to the list is the name of the file, but when I remove the command line arguments from the project properties, and compile it, when I dbl click on the file, the value added to the list is "the name of the file"(note that the quotation marks have been added), and I think that that is part of the problem, do you think it is, and if so, how do you think I should correct it?
-
Not sure I understand your problem but...
Is the client's directory set up like the one you are using to compile the code? It may find the path on your computer but the client path is different and will not be found.
-
Post your code. It will be easier for us to track down the error.
-
Code:
Private Sub Form_Load()
If (Command <> "") Then
getFile Command
End Sub
Private Sub getFile(fileName as String)
Open fileName as #1
Input #1, txtString
Listview1.ListItems.Add , , txtString
Close #1
End Sub
And the error says 'Bad file name or number'
-
Code:
Open fileName for Input as #1
Should actually say bad filemode, open in a mode, in this case Input.
-
Sorry
I did have it as :
Code:
Open fileName For Input As #1
Forgot it when typing.
-
Basically, the issue is that when I drag the file I want to open with my app over my app's icon, the value of Command is this:
C:\windows\desktop\testdoc.jmd
and when I double click on the file the value of Command is this:
"C:\windows\desktop\testdoc.jmd"
why is it doing this?