如何使用vb.net代码将文件插入到文件夹中 [英] how to insert a file into a folder using the vb.net code
问题描述
在Windows 7中有一个关于资源管理器的问题。
我需要获取焦点(选中)文件夹名称并将一个文件插入到通过在vb.net中编码,explorer.exe中的文件夹。
i已经花了很多时间在网上搜索解决方案但没有得到。
$ b在MS WORD中$ b,我们可以获得焦点(选中)文本并将一些文本插入(或替换)到单词中。以下是将一些文本插入MS WORD的示例。
Dim mySelection As Word.Selection
设置mySelection = Documents.Application.Selection
使用mySelection
。插入Text1.Text&vbCrLf
.Font.Size = 16
结束
i认为,将文件插入explorer.exe中的文件夹比将文本插入word.exe中的单词更难。
所以请专家帮助解决。/ >
谢谢。
关于
there is 1 question about the explorer in windows 7.
I need to get the the focus(selected) folder name AND insert one file into the folder in explorer.exe by coding in vb.net .
i have tried a lot of time to search the solution in net but not get .
in"MS WORD", we can get the focus(selected)text and insert(or replace) some text into the word.the following is a example for insert some text into the "MS WORD".
Dim mySelection As Word.Selection
Set mySelection = Documents.Application.Selection
With mySelection
.InsertAfter Text1.Text & vbCrLf
.Font.Size = 16
End With
i think ,to insert a file into a folder in explorer.exe is harder than to insert a text into the word in word.exe .
so, please experts help the solution .
thanks.
regards
推荐答案
您可以为资源管理器创建扩展。当用户从上下文菜单中选择扩展名时,您可以执行所需的操作。
查看这些文章:
- 如何使用.NET语言编写Windows Shell扩展 [ ^ ]
- < a href =http://www.codeproject.com/Articles/512956/NET-Shell-Extensions-Shell-Context-Menus> .NET Shell扩展 - Shell上下文菜单 [ ^ ]
You can create an extension to the Explorer. When the user selects the extension from the context menu, you can do the operations you need.
Have a look at these articles:
- How to Write Windows Shell Extension with .NET Languages[^]
- .NET Shell Extensions - Shell Context Menus[^]
感谢Mika Wendelius。
这是你回复的好指南。我会试试。
谢谢
问候
thanks for Mika Wendelius.
it is good guide from your reply. i'll try it.
thanks
regards
这篇关于如何使用vb.net代码将文件插入到文件夹中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!