Visual Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 18013
Number of posts: 55386

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Project Source Packaging Posted by mechatronics on 19 Dec 2004 at 12:30 PM
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
Report
Re: Project Source Packaging Posted by Genjuro on 19 Dec 2004 at 12:40 PM
: 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).
Report
Re: Project Source Packaging Posted by mechatronics on 26 Dec 2004 at 2:10 PM
: : 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.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.