.NET CF - 启动浏览器programmaticly [英] .net cf - launch explorer programmaticly

查看:174
本文介绍了.NET CF - 启动浏览器programmaticly的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我的.Net CF窗口的应用程序编程启动浏览器。但其引发的win32异常。我已经使用相同类型的code在桌面.NET版本,它总是工作。 (我使用的是Windows CE 5和.Net CF 3.5)

随着code抛出Win32异常,

 的Process.Start(\\,NULL);
 

不幸的是,我现在用的是code是这样的: - (

 尝试
{的Process.Start(\\,NULL); }
抓住 { }
 

解决方案

也许你应该给它一个程序名开始? \不是应用程序。这样的事情可能更容易得到成功的:

 的Process.Start(\\ \\窗户的explorer.exe,NULL);
 

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 { }

解决方案

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); 

这篇关于.NET CF - 启动浏览器programmaticly的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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