You are here:

Visual Basic/path of the folder

Advertisement


Question
i have created an application where if i rightclick on a folder an option appears where my form gets loaded.
i need to get the full path of this folder in my application.
i tried

Environment.CurrentDirectory

but it only shows the opened directory path and not the path of the selected item in it.

Answer
Without seeing your code, this is difficult to answer as I don't know how your list of folders was created, nor what your right-click is communicating with.

However, if your folder list is custom and not the OOB version of browse, then you should have that information available to you as you created the folders.  If not, when you create the nodes to represent the folders, you can set the TAG property with the full folder path in question.

Visual Basic

All Answers


Answers by Expert:


Ask Experts

Volunteer


Robert Nunemaker

Expertise

String manipulation, Database access and usage, Class creation, and encapsulation are my strong suits. Active X Controls and DLL`s also. Although I don`t deal with Crystal - frankly because I don`t like it; I prefer to do things manually.

Experience

Employment history: Programmed with the Air Force for 15 years, and have continued in the private sector for the past 1 year. Used VB (all versions) for the past 8 years.

Organizations: MCP and MCSD certified.

Education: Computer Science Bachelor degree.

Awards: MCP and MCSD certified.

©2016 About.com. All rights reserved.