.net cf - 以编程方式启动资源管理器

发布于 2024-09-06 18:16:27 字数 303 浏览 1 评论 0原文

我正在尝试从 .Net CF Window 应用程序以编程方式启动资源管理器。但它抛出 win32 异常。我在桌面.Net 版本中使用了相同类型的代码,并且它总是有效。 (我正在使用 Windows CE 5 和 .Net CF 3.5 )

以下代码抛出 Win32 异常,

Process.Start("\\", null);

不幸的是,我正在使用这样的代码:-(

try
{ Process.Start("\\", null); }
catch { }

I am trying to launch explorer programmatically from my .Net CF Window application. But its throwing win32 exception. I have used same kind of code in desktop .Net version, and it always worked.
(I am using Windows CE 5 and .Net CF 3.5 )

Following code throws Win32 Exception,

Process.Start("\\", null);

Unfortunately, I am using the code like this :-(

try
{ Process.Start("\\", null); }
catch { }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

乖乖公主 2024-09-13 18:16:27

也许你应该给它一个程序名称来启动? “\”不是一个应用程序。像这样的事情可能更有可能取得成功:

Process.Start("\\windows\\explorer.exe", null); 

Maybe you should give it a program name to start? "\" is not an application. Something like this is probably more likely to yield success:

Process.Start("\\windows\\explorer.exe", null); 
暖风昔人 2024-09-13 18:16:27

为了启动 Web 浏览器导航到 URL,我总是直接将 Start 方法的参数设置为 url 本身。请尝试以下操作,看看它在 .NET CF 中是否有帮助"

Process.Start("http://www.yahoo.com", null);

ie

Process.Start([url_variable], null);

In order to kick off a web browser navigation to a URL, I have always directly set the argument of the Start method to the url itself. Please try the following to see if it helps in .NET CF"

Process.Start("http://www.yahoo.com", null);

i.e.

Process.Start([url_variable], null);

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文