拖放到桌面图标上 [英] Drag and Drop onto Desktop Icon
本文介绍了拖放到桌面图标上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
接受图标上的删除文件;启动应用程序并将文件路径详细信息放入文本框,以便用户可以处理它。
应用程序是用C#编写的
谢谢
解决方案
尝试以下操作:
class程序
{
static void Main(string [] args)
{
args [0]是文件
}
}
I think this should be simple. I have looked at similar questions here but it is not clear to my old brain as to how it should work. I have a Windows Forms Application. My users want to drag a file over the application icon on the desktop and execute the program with that file. So what I would like to do is:
Accept the dropped file on the icon; start the application and place the file path details into a textbox so that the user can process it.
The application is written in C#
Thanks
解决方案
Try the following:
class Program
{
static void Main(string[] args)
{
args[0] is the file
}
}
这篇关于拖放到桌面图标上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文