Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2008 > C# 2008 aka C# 3.0
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# 2008 aka C# 3.0 Discuss the Visual C# 2008 (aka C# 3.0) language
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2008 aka C# 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 20th, 2010, 04:10 AM
Registered User
 
Join Date: Jan 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to get current location of folder or drive on right click on folder or drive

Hi
I have develop an application using C# dot net. I have called this application on
right click on any folder.Now I want pass full path or Name of the folder whose right click called my application.
Please help me.To get the folder name or path on right click on folder in C#
Thanks
  #2 (permalink)  
Old January 20th, 2010, 05:17 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,133
Thanks: 1
Thanked 189 Times in 188 Posts
Default

When you set up your application on the right click simply pass the folder name along with the application name - this will go in the registry:

C:\Program Files\MyApp\MyApp.exe "%1"

Then use standard command line stuff to get the command line parameter.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Retriving UNC Path of mapped drive (Linux Folder) kaushalparik ASP.NET 2.0 Professional 2 April 5th, 2007 10:58 PM
Project Folder Location ag19702004 Visual Studio 2005 0 March 14th, 2007 01:25 PM
Making a folder virtual folder on button click in CsharpHelp C# 0 October 26th, 2005 06:57 AM
How to find if drive is a mapped drive BrianWren Pro VB 6 1 June 2nd, 2005 05:07 AM
How to find if drive is a mapped drive BrianWren Access VBA 0 June 1st, 2005 05:55 PM



All times are GMT -4. The time now is 02:36 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.