Results 1 to 7 of 7

Thread: Changing path of a .vbp project

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Posts
    138

    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

  2. #2
    Fanatic Member neicedover1982's Avatar
    Join Date
    Jun 2005
    Posts
    566

    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?
    Kevin | New England Iced Over | http://www.kevincawleyjr.com

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Posts
    138

    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.

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    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.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Posts
    138

    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

  6. #6

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Posts
    138

    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
  •  



Click Here to Expand Forum to Full Width