Resource Directory VB.NET 2005

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Just Me

    #1

    Resource Directory VB.NET 2005


    I need to access a text document in the folder where my project is stored,
    does anyone know how I can tell were the folder is from within a form.

    Like me.myDirectory or something like it ?



  • Cor Ligthert [MVP]

    #2
    Re: Resource Directory VB.NET 2005

    Just Me,

    I would create a registry property from that, others will use a config.file

    Cor

    "Just Me" <news.microsoft .comschreef in bericht
    news:%23DwudgCL HHA.960@TK2MSFT NGP04.phx.gbl.. .
    >
    I need to access a text document in the folder where my project is stored,
    does anyone know how I can tell were the folder is from within a form.
    >
    Like me.myDirectory or something like it ?
    >
    >
    >

    Comment

    • Just Me

      #3
      Re: Resource Directory VB.NET 2005


      I just used "../../" in the end. Thanks


      "Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
      news:ufuo9ADLHH A.420@TK2MSFTNG P06.phx.gbl...
      Just Me,
      >
      I would create a registry property from that, others will use a
      config.file
      >
      Cor
      >
      "Just Me" <news.microsoft .comschreef in bericht
      news:%23DwudgCL HHA.960@TK2MSFT NGP04.phx.gbl.. .
      >>
      >I need to access a text document in the folder where my project is
      >stored, does anyone know how I can tell were the folder is from within a
      >form.
      >>
      >Like me.myDirectory or something like it ?
      >>
      >>
      >>
      >
      >

      Comment

      • Roger Vale

        #4
        Re: Resource Directory VB.NET 2005

        Hi

        If i understnd what you want to find the application path you can use

        Dim fullPath As String =
        System.Reflecti on.Assembly.Get ExecutingAssemb ly().GetName(). CodeBase
        then where ever the application is installed you will always be ok

        Roger

        "Just Me" <news.microsoft .comwrote in message
        news:%23DwudgCL HHA.960@TK2MSFT NGP04.phx.gbl.. .
        >
        I need to access a text document in the folder where my project is stored,
        does anyone know how I can tell were the folder is from within a form.
        >
        Like me.myDirectory or something like it ?
        >
        >
        >

        Comment

        • Bruce W. Darby

          #5
          Re: Resource Directory VB.NET 2005

          JustMe,

          You can also take a look at Application.Sta rtupPath

          Bruce

          "Roger Vale" <roger.vale@bti nternet.comwrot e in message
          news:%23tb%23qo LLHHA.4244@TK2M SFTNGP04.phx.gb l...
          Hi
          >
          If i understnd what you want to find the application path you can use
          >
          Dim fullPath As String =
          System.Reflecti on.Assembly.Get ExecutingAssemb ly().GetName(). CodeBase
          then where ever the application is installed you will always be ok
          >
          Roger
          >
          "Just Me" <news.microsoft .comwrote in message
          news:%23DwudgCL HHA.960@TK2MSFT NGP04.phx.gbl.. .
          >>
          >I need to access a text document in the folder where my project is
          >stored, does anyone know how I can tell were the folder is from within a
          >form.
          >>
          >Like me.myDirectory or something like it ?
          >>
          >>
          >>
          >

          Comment

          Working...