|
-
Oct 20th, 2000, 04:52 PM
#1
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?
-
Oct 20th, 2000, 04:57 PM
#2
Hyperactive Member
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.
-
Oct 20th, 2000, 06:41 PM
#3
Post your code. It will be easier for us to track down the error.
-
Oct 20th, 2000, 07:25 PM
#4
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'
-
Oct 20th, 2000, 07:30 PM
#5
transcendental analytic
Code:
Open fileName for Input as #1
Should actually say bad filemode, open in a mode, in this case Input.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 20th, 2000, 07:33 PM
#6
Sorry
I did have it as :
Code:
Open fileName For Input As #1
Forgot it when typing.
-
Oct 20th, 2000, 08:07 PM
#7
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|