如何在C#中给出路径 [英] how to give path in C#

查看:60
本文介绍了如何在C#中给出路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何指定路径..



我正在使用System.Windows.Forms.SendKeys.SendWait({});

打开一个标签。



i需要用exe文件的路径填充该窗口。通过c#。任何暗示

how to specify path ..

am using System.Windows.Forms.SendKeys.SendWait("{}");
to open a tab.

i need to fill that window with a path for an exe file.Through c#.Any suggestiios

推荐答案

您可以使用SendKeys,现在为路径的每个字符发送一个密钥。

Alternativeley,将字符串放入剪贴板,然后发送密钥以便从剪贴板插入(通常是ctrl + v)。

但是其他工具如Accessibility命名空间可能对这些任务更有用(取决于目标窗口的类型)。
You may use SendKeys, and now send one key for each character of the path.
Alternativeley, put the string into the clipboard, and then send the key for inserting from the clipboard (typically ctrl + v).
But other tools like the Accessibility namespace might be more useful for such tasks (depending on the type of the target window).


路径是动态的,如何填写文件名?
path is dynamic ,how to fill the file name??


这篇关于如何在C#中给出路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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