Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I Add Menu Items Under the Windows Right-Click .. and i link it with a .exe file... i want to get a path of a write clicked file/folder to a text box in my app(linked .exe file)
Posted
Comments
BillWoodruff 25-Oct-14 16:49pm    
So, show us your code as it is now.
Sergey Alexandrovich Kryukov 26-Oct-14 0:05am    
Not clear what exactly you are trying to achieve and what's the problem.
—SA
Anuruddha_r 26-Oct-14 2:19am    
in progamme.cs
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form1 p = new Form1();
// Application.Run(new Form1());
if (args.Length > 0)
{
p.pathkey = args[250];
}
Application.Run(p);
}

in form 1.cs


private string _pathkey;
public string pathkey
{
get { return _pathkey; }
set { _pathkey = value; }
}
private void Form1_Load(object sender, EventArgs e)
{
if (this.pathkey != null)
{
textBox1.Text = pathkey;
}
}
Anuruddha_r 26-Oct-14 2:26am    
http://www.howtogeek.com/howto/windows-vista/add-any-application-to-the-desktop-right-click-menu-in-vista/

i created app .. and link that.exe like that link... when we write click on a folder and then i can run my new app .. so all i want is get a path of write clicked folder to my app

1 solution

Well the right clicked file pah would be passed through windows as a parameter.

This should help a bit:

http://www.howtogeek.com/howto/windows-vista/add-any-application-to-the-desktop-right-click-menu-in-vista/[^]
 
Share this answer
 
Comments
Anuruddha_r 25-Oct-14 15:53pm    
No, i created it like that... i created a app with just one textbox ... and i link it mentioned before .. nw i want to get a folder location of write clicked folder using C#

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900