C# 操作注册表

来源:互联网 发布:宇宙外面是什么 知乎 编辑:程序博客网 时间:2024/06/11 22:42
//设置ie打印的边距
                RegistryKey regKey = Registry.CurrentUser;                string SubKeyPath = @"Software\Microsoft\Internet Explorer";                RegistryKey optionKey = regKey.OpenSubKey(SubKeyPath, true).CreateSubKey("PageSetup");                optionKey.SetValue("header", "");                optionKey.SetValue("footer", "");                optionKey.SetValue("margin_top", "0.0");//                optionKey.SetValue("margin_bottom", "0.0");//                optionKey.SetValue("margin_left", "0.10748");//4/                optionKey.SetValue("margin_right", "0.10748");//4                //optionKey.SetValue("margin_left", "0");//4/                //optionKey.SetValue("margin_right", "0");//4                optionKey.SetValue("Print_Background", "no");  //yes no                optionKey.SetValue("Shrink_To_Fit", "yes");  //yes no   启用缩小字体填充

0 0
原创粉丝点击