title: How can I get access to the files root directory without giving full path name in VB .NET
body: <p>I am developing a Windows application in Visual Studio 2008 with SQL Server CE as database. <code>D:/My Project/Library</code> is the root directory for my project's source code. </p>
  
  <p>I have some files which I want to access within the forms of my project. They are stored in <code>D:/My Project/Library/New Resources</code>. To access those files I can't use the full path name because I keep changing the location of my project's source code. I need something like wherever the source directory may be the files must be accessed from there only.</p>
  
  <p>Ex:</p>
  
  <p><code>Public Sub setconnection()
  con = New SqlClient.SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=H:\Library\Library\Library1.mdf;Integrated Security=True;User Instance=True")
  cmd.Connection = con
  con.Open()
  End Sub</code></p>
  
  <p>I want to use relative path name for Library1.mdf file without using <strong>H:\Library\Library</strong> path name.</p>