Post

 Resources 

Console


Re: Quests of Middle Earth Demo Available - Rag on a Stick (0 replies, 928 views) (2004-Feb-9)
-
One thing which I'll add to the App.Path thing is that there is one thing which makes it annoying - people who can't think of a directory name so they put it in the root directory. Why is this a problem? For folders, App.Path might return "C:\Program Files", to which you put a "\blah" on the end. If your program is running from the root of a drive, App.Path will return something like "C:\" and when you add the "\blah" you end up with an error. Hence, I always use a function which looks like this: Public Function AppPath() As String If Right$(App.Path, 1) = "\" Then AppPath = Left$(App.Path, Len(App.Path) - 1) Else AppPath = App.Path End If End Function One time when you might like things running from the root of a drive is if you are running off a CD. But even then, I can't see exactly why.


-
Up One Level | Back to News


Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 123 visitors within the last 20 minutes
RSS News Feed