Path Question

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

    #1

    Path Question

    How would I get the path of my program?
    Thanks
    Diarmuid


  • Ken Tucker [MVP]

    #2
    Re: Path Question

    Hi,



    Ken
    ----------------
    "Diarmuid" <diarmuid@deads pam.com> wrote in message
    news:eN0zsUeuFH A.2540@TK2MSFTN GP09.phx.gbl...[color=blue]
    > How would I get the path of my program?
    > Thanks
    > Diarmuid
    >[/color]


    Comment

    • Diarmuid

      #3
      Re: Path Question

      Thanks. Nice site, btw.


      "Ken Tucker [MVP]" <vb2ae@bellsout h.net> wrote in message
      news:e0CgnZeuFH A.3012@TK2MSFTN GP10.phx.gbl...[color=blue]
      > Hi,
      >
      > http://www.windowsformsdatagridhelp....c-dfa89d0d9842
      >
      > Ken
      > ----------------
      > "Diarmuid" <diarmuid@deads pam.com> wrote in message
      > news:eN0zsUeuFH A.2540@TK2MSFTN GP09.phx.gbl...[color=green]
      >> How would I get the path of my program?
      >> Thanks
      >> Diarmuid
      >>[/color]
      >
      >[/color]


      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: Path Question

        "Diarmuid" <diarmuid@deads pam.com> schrieb:[color=blue]
        > How would I get the path of my program?[/color]

        Either add a reference to "System.Windows .Forms.dll" and import the
        'System.Windows .Forms' namespace in order to use 'Application.St artupPath'
        or use the code below:

        \\\
        Imports System.IO
        Imports System.Reflecti on
        ..
        ..
        ..
        Private Function ApplicationPath () As String
        Return _
        Path.GetDirecto ryName([Assembly].GetEntryAssemb ly().Location)
        End Function
        ///

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://classicvb.org/petition/>

        Comment

        Working...