- The directory from which the application loaded.
- The current directory.
- Windows 95 and Windows 98: The Windows system directory.
Windows NT: The 32-bit Windows system directory. - Windows NT: The 16-bit Windows system directory.
- The Windows directory. Use theGetWindowsDirectory function to get the path of this directory.
- The directories that are listed in the PATH environment variable.
Code: Select all
ChDrive App.Path
ChDir App.Path
ChDir ".."
The problem in VB.NET is there is no App object. If you try the above you'll just get an error message. The solution comes from Googling "VB.NET App.Path". There you'll find a replacement for App.Path:
Code: Select all
Public Function App_Path() As String
Return System.AppDomain.CurrentDomain.BaseDirectory()
End Function
If you display App_Path in a MsgBox you'll find that it's the \bin folder below the project files. In the case of the example programs that's 3 levels below the \dplotlib folder. So in the Form_Load event for the examples, if you add:
Code: Select all
ChDrive(App_Path())
ChDir(App_Path())
ChDir("..\..\..") ' or ChDir("....")