可以实现
在窗体中添加Web Browser控件, 在项目引用中再添加Microsoft HTML Object Library在按钮上写代码:
foreach ( InternetExplorer ie in new ShellWindows() )
{
if( ie.Document is mshtml.HTMLDocument)
{
mshtml.HTMLDocument c = ie.Document as mshtml.HTMLDocument;
mshtml.IHTMLWindow2  hh = c.parentWindow;
if(hh.opener != null)
{
MessageBox.Show(c.title + "  " + c.url + "  " + "是打开的新窗口");
}
                  else
         MessageBox.Show("非新窗口" + c.title + "  " + c.url );

          }
}

解决方案 »

  1.   

    System.Diagnostics.Process.Start("iexplore.exe","www.sina.com.cn");
      

  2.   

    //try get from javascript:<script language='jscript'>
    try {
     var t = window.opener.location;
     alert('new window');
     location.href='myasp.aspx?window=new';
    }
    catch {
     alert('window opened');
    }
    </script>
      

  3.   

    上面的例子反了//try get from javascript:<script language='jscript'>
    try {
     var t = window.opener.location;
     alert('opened window');
    }
    catch {
     alert('new window');
     location.href='myasp.aspx?window=new';
    }
    </script>
      

  4.   

    System.Diagnostics.Process.Start("iexplore.exe","www.sina.com.cn");
      

  5.   

    非常感谢 panyee(快乐王子),如果是用javascript就太简单了,问题是我在c#里面用,就不能直接用脚本了。