改变IE工具栏的背景

//-------------------------------------

//  ChangeIE.cs ? 2004 by David

//-------------------------------------

using System;

using Microsoft.Win32;  //对注册表操作一定要引用这个命名空间

namespace ChangeIEbackColor

{

    
class ChangeIEbackColor

    
{       

        [STAThread]

        
static void Main(string[] args)

        
{

          RegistryKey pregkey ;

pregkey 
= Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Internet" + 

                                          
"Explorer\\Toolbar\\Explorer ",true);

            
if (pregkey==null

            
{

                Console.WriteLine(
"键值不存在");

            }


            
else

            
{

                pregkey.SetValue(
"BackBitmap","C:\\windows\\Greenstone.bmp");

                Console.WriteLine(
"修改成功");  

            }


            pregkey.Close;

        }


    }


}
posted on 2005-03-02 17:20  David.he  阅读(288)  评论(1编辑  收藏  举报