Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. ็How to get path of application if it isn't Windows Form

็How to get path of application if it isn't Windows Form

Scheduled Pinned Locked Moved Visual Basic
phpcomtutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Krirk
    wrote on last edited by
    #1

    If my application is Windows Form I just use App.StartUpPath,But if it is class library can i get path of library. :confused::confused:

    My blog

    L 1 Reply Last reply
    0
    • K Krirk

      If my application is Windows Form I just use App.StartUpPath,But if it is class library can i get path of library. :confused::confused:

      My blog

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, you will need the Assembly class, get the assembly instance you are interested in (maybe with GetExecutingAssembly), and look at one of its properties (probably Location). :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.


      K 1 Reply Last reply
      0
      • L Luc Pattyn

        Hi, you will need the Assembly class, get the assembly instance you are interested in (maybe with GetExecutingAssembly), and look at one of its properties (probably Location). :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.


        K Offline
        K Offline
        Krirk
        wrote on last edited by
        #3

        Thank you Luc Pattyn you help me again. :)

        My blog

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups