|
-
Oct 11th, 2005, 02:51 PM
#1
Thread Starter
Addicted Member
Changing path of a .vbp project
Hi there all!
Here's a noob question :
I've made a small vb application, but everytime I move it around on my
disk, I can't load the project file with all it's components without getting
a project location (path) error.
Is there any way I can change the path within the project?
TIA
-
Oct 11th, 2005, 03:07 PM
#2
Fanatic Member
Re: Changing path of a .vbp project
What components are you talking about? Are you loading things like text files and pictures?
If you write out all your paths, like "C:/windows/?/?/?" don't.
Write out paths as "app.path & "/filename"
this way as long as your files are in the same order and folder layout, no matter where you put your .vbp it will work (as long as the files your loading are there too)
Get it?
-
Oct 11th, 2005, 03:21 PM
#3
Thread Starter
Addicted Member
Re: Changing path of a .vbp project
Perhaps I didn't explain this properly or I don't understand what you're saying.
I'm talking about the forms and the .bas modules in my project using Visual Studio.
I'm not talking about the code itself.
Visual studio creates a project (.vbp) containing the path of all the module and forms used in the project. Now if I move the whole thing to a new location on my disk, it can't find the .bas module and forms.
I don't write the path anywhere, Visual studio seems to be doing it for me.
Where do I write the path? I guess this is what I'm asking.
TIA
Last edited by D-niss; Oct 11th, 2005 at 03:26 PM.
-
Oct 11th, 2005, 03:25 PM
#4
Re: Changing path of a .vbp project
D-niss,
That is a problem with the way VB stores the path information in the project file. It is stored in the relative format and if you do not move the project to a similar folder you will get those errors. Expecially if you saved your files in the defaiult location... which you should never ever do.
You have to move the whole folder along with the .bas, .frm and anything else your project uses.
-
Oct 11th, 2005, 03:29 PM
#5
Thread Starter
Addicted Member
Re: Changing path of a .vbp project
Say I move form d:\myprojects\Thisproject to c:\mydocuments\Thisproject,
\Thisproject containing all the files, will it work?
Does it take into account every sub-directories or just the last one? What about the disk letter?
Thanx
-
Oct 11th, 2005, 03:31 PM
#6
Re: Changing path of a .vbp project
Bring your VBP file into NotePad or some other text editor and you will see how to change where it thinks your files are.
-
Oct 11th, 2005, 03:34 PM
#7
Thread Starter
Addicted Member
Re: Changing path of a .vbp project
lol didn't think of that.
Thanx a bunch.
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
|