右键单击目录路径 [英] Directory Path from Right Click

查看:96
本文介绍了右键单击目录路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个可以用密码保护单个文件夹的程序,但是我遇到了一些麻烦.我已经在上下文菜单中添加了该选项,但是我不知道如何获取右键单击以打开上下文菜单程序的文件夹路径.

I'm trying to write a program that can password protect individual folders, but I'm having a little trouble. I already have the option added to the context menu, but I don't know how to get the folder path that was right clicked on to open the context menu program.

推荐答案

操作系统应将路径作为参数传递给您的程序.它应该是第一个.您只需要在代码中捕获命令行参数即可.

The OS should pass the path to your program as an argument. It should be the first one. You would just need to capture the command line arguments in your code.

C#-应用程序参数

这篇关于右键单击目录路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆