开发者

.net cf - launch explorer programmatically

开发者 https://www.devze.com 2023-01-04 03:49 出处:网络
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 alway开发者_Python百

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 alway开发者_Python百科s 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); 


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

0

精彩评论

暂无评论...
验证码 换一张
取 消