: : Hi,
: : Altough I thought that my level in programming is beyond the avergae, I have encountered a problem that makes me feel disperate. After creating one of my projects I tried to run it at my friend's PC. A message occured showing that an error in Path occured. I wonder how people can spread their source code as it works irrespective of its location. Any help regarding that is sincerely appreciated
: : Waleed A. El-Badry
: :
:
: Using App.Path instead of assuming the directory of a file.
: If you copy all of the files your app requires in the same file as your app's .exe, you can simply write:
:
:
: Open App.Path & "\myfile.dat" for input as #1
:
:
: and, unless your users will mess with your program files (delete or move them manually - and then it suits them that it doesn't run anymore), no matter the install directory, your program will find the "myfile.dat" file.
: The same goes for subdirectories (App.Path & "\MyDir\Myfile.dat" will insure that your program will search for the "myfile.dat" file in the "MyDir" subfolder of your exe folder).
:
I believe that I'm aware of that fact. I meant that when you design a visual basic project, then you attempt to run it on another PC, you recieve a loading error. I don't want to run it as exe program. I want to distribute it as a source code program without the occurance of this error.