You are here:

Visual Basic/get the path of the selected 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
Hi, Jithin,

As far as I understand if you right click the Current directory is not changing.

I'd try to use regular click and show your option AFTER Current directory changes

(If this answer is not sufficient, please, send part of your code which is creating a problem)


Sincerely,

Vitaly

Visual Basic

All Answers


Answers by Expert:


Ask Experts

Volunteer


VITALY

Expertise

Area of expertise is Visual Basic .NET (VS 2008 and Framework 3.5) design and development for Windows applications. You can ask me any Visual Basic questions and some questions about .NET Framework. You can also ask me how to use Component One controls in Visual Basic. Do not ask me questions about Web design and development in Visual Basic.

Experience

I'm working as VB programmer from 1997, so I have a lot of experience with Visual Basic .NET as well as Visual Basic 6. Area of expertise is Visual Basic .NET (VS 2008 and Framework 3.5) design and development for Windows applications; Component One controls for Visual Basic; User controls; Moving VB6 applications to .NET.

Education/Credentials
B.S. in Computer Science

©2016 About.com. All rights reserved.