New to VB 2005 / relative paths

By pizzathahut ·
Hi ya'll! 1st question here.
I've been out of programming for a few years now and am currently attempting to refresh myself and tackle the whole .Net bs due to work, they work in C# so I'm tackling VB2005 1st ( I have my VB6) to get my memory refreshed then will tackle C#.

So I've been playing around with the basics, load txt files, populate lsts at runtime and via files ect ect. so I have some of the new VB syntax covered so far.

I have my app running fine, problem I encountered though is when I go to build it, like make the install file ect, my program is not portable as I all files are listed explicitly and I'm having issues with using relative paths.

Now I figured this would be easy to overcome over a little googling, but alas, .Net is pissing me off. Almost so I considered going back to VB6 just to get my project done.

No I really miss the easy VB6 way of doing things. there has to be some simple way to buil dmy project with an intended install path with all sub dirs included in the install.

Can anyone point me in the right direction?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

VB 2005 makes it easy

by Bob G Beechey In reply to New to VB 2005 / relative ...

You simply identify the current directory of your app. For example:
Dim MyAppDir As String = Environment.CurrentDirectory
Then you can append this with subdirectory name at leisure.
For example:
Dim MySubName As String = "DataFiles"
Dim MyFullName As String = MyAppDir & "\" & MySubName
Hope this helps. The Environment class is very useful in VB2005

Related Discussions

Related Forums