2009-02-02 3 views

답변

2
Process.Start("http://example.com"); // <-- put your url there. 

또한 가장 큰 효과로 그 사용 방법에 대한이 짧은 문서를 참조하십시오
요약 http://code.logos.com/blog/2008/01/using_processstart_to_link_to.html

:

void OpenBrowser(string url) 
{ 
    try 
    { 
     Mouse.OverrideCursor = Cursors.AppStarting; 
     Process.Start(url); 
    } 
    catch (Exception) 
    { //swallow: exception is sometimes thrown even though 
    } // the call completed without error 
    finally 
    { 
     Mouse.OverrideCursor = null; 
    } 
} 
+0

흠, 브라우저를 열어 보려고합니다. 나는 뭔가 다른 것을 필요로한다. 브라우저를 열 수 있지만 필요한 페이지가 열려 있는지 프로그래밍 방식으로 정의해야합니다. – mimic

+0

그러면 true를 반환합니다. 유효한 URL을 전달하고 인터넷을 사용할 수 있으면 호출이 성공했다고 가정 할 수 있습니다. –

+0

그러나 _really_ 확실하게 알고 싶다면 Process.Start()는 Process 인스턴스를 반환합니다.이 인스턴스를 사용하면 어떤 페이지가로드되었는지 판별 할 수 있습니다. –

관련 문제