自己做了一个浏览器,设为了默认浏览器。可是,当我点击QQ空间时,软件是启动了,可就是关联不到那个QQ空间的网址..我不要手动输入到地址栏那
有没有办法呀?帮忙,各位大哥

解决方案 »

  1.   

    程序名后面加上地址:exploer.exe http://....aspx
    地址用url字符串。
      

  2.   

    还是再说详细一点吧,就是点击了QQ空间,它就打开了我的浏览器,仅此而已...没有增加一个新的标签来打开空间,也没有链接到空间...这要怎么弄才行...跟IE那样???
      

  3.   

    程序的启动参数,吧空间的url接收,然后打开这个url
      

  4.   

    我觉得思路是这样的:既然是自己做的浏览器,就在打开浏览器的时候设置为默认浏览器,操作注册表。我找了一下,网上有和你遇到同样的问题,解决方法:http://www.xueit.com/html/2010-01-14/21-90618587890.html
      

  5.   

    部分代码:/// <summary>
            /// 设置自定义浏览器为默认浏览器
            /// </summary>
            /// <param name="browserExePath">自己做的浏览器exe文件的路径</param>
            /// <returns></returns>
            public static bool SetDefaultBrowser(string browserExePath)
            {
                string mainKey = @"http\shell\open\command";
                string nameKey = @"http\shell\open\ddeexec\Application";
                bool result = false;            try
                {
                    string value = string.Format("\"{0}\" \"%1\"", browserExePath);
                    RegistryKey regKey = Registry.ClassesRoot.OpenSubKey(mainKey, true);
                    regKey.SetValue("", value);
                    regKey.Close();                FileInfo fileInfo = new FileInfo(browserExePath);
                    string fileName = fileInfo.Name.Replace(fileInfo.Extension, "");
                    regKey = Registry.ClassesRoot.OpenSubKey(nameKey, true);
                    regKey.SetValue("", fileName);
                    regKey.Close();                result = true;
                }
                catch(Exception ex)
                {
                    LogHelper.Error(ex);
                }            return result;
            }
      

  6.   

    解决了,要设默认浏览器的就是八楼给的网址我的问题解决:就在/// 应用程序的主入口点。
        /// </summary>
       [STAThread]
        static void Main(string[] args)
    红色部分是要传进去的参数...这样就能关联了我要去面壁了,竟然忘了..结贴了