How to add website into compatibility view ?
-
Hello, I am not an expert in C# but this site helped a lot creating a mini application that launches IE9, modifies some registry keys and bingo. Now, I have to add a few modifications but launch IE11. This is the code:
//Select the RegistryHive you wish to read from
RegistryKey key00 = RegistryKey.OpenRemoteBaseKey(RegistryHive.CurrentUser, "");//Select the path within the hive RegistryKey subkeyAA = key00.OpenSubKey("Software\\\\Microsoft\\\\Internet Explorer\\\\BrowserEmulation\\\\ClearableListData", true); string\[\] namesAA = subkeyAA.GetValueNames(); string YesUserFilter = ""; string NoUserFilter = ""; foreach (string name in namesAA) { if (name.Equals("UserFilter", StringComparison.CurrentCulture)) { // Found UserFilter YesUserFilter = "1"; break; } else { // No Found UserFilter NoUserFilter = "1"; } } if (YesUserFilter == "1") { int myValue = (int)subkeyAA.GetValue("UserFilter"); if (myValue != 0) { //Console.WriteLine("Setting the right GE Recommendation"); subkeyAA.SetValue("UserFilter", "company.com", RegistryValueKind.Binary); } } if (NoUserFilter == "1") { //Console.WriteLine("Setting the right GE Recommendation"); subkeyAA.SetValue("UserFilter", "company.com", RegistryValueKind.Binary); } subkeyAA.Close();
But the conditionals of YesUserFilter or NoUserFilter are blank, Thoughts ? Thanks for your help.
-
Hello, I am not an expert in C# but this site helped a lot creating a mini application that launches IE9, modifies some registry keys and bingo. Now, I have to add a few modifications but launch IE11. This is the code:
//Select the RegistryHive you wish to read from
RegistryKey key00 = RegistryKey.OpenRemoteBaseKey(RegistryHive.CurrentUser, "");//Select the path within the hive RegistryKey subkeyAA = key00.OpenSubKey("Software\\\\Microsoft\\\\Internet Explorer\\\\BrowserEmulation\\\\ClearableListData", true); string\[\] namesAA = subkeyAA.GetValueNames(); string YesUserFilter = ""; string NoUserFilter = ""; foreach (string name in namesAA) { if (name.Equals("UserFilter", StringComparison.CurrentCulture)) { // Found UserFilter YesUserFilter = "1"; break; } else { // No Found UserFilter NoUserFilter = "1"; } } if (YesUserFilter == "1") { int myValue = (int)subkeyAA.GetValue("UserFilter"); if (myValue != 0) { //Console.WriteLine("Setting the right GE Recommendation"); subkeyAA.SetValue("UserFilter", "company.com", RegistryValueKind.Binary); } } if (NoUserFilter == "1") { //Console.WriteLine("Setting the right GE Recommendation"); subkeyAA.SetValue("UserFilter", "company.com", RegistryValueKind.Binary); } subkeyAA.Close();
But the conditionals of YesUserFilter or NoUserFilter are blank, Thoughts ? Thanks for your help.
Hi, The first thing I would look at is the
MissingManifestResourceException
. It seems that, in your WindowsFormsApplication1 project, there's a problem with a resource file. There can be several causes; could you check that, for every .resx file in your project, there is a .designer.cs file associated? IsForm1
marked as localizable? If so, there must also exist some relative resource files. Another thing to do would be to put a beakpoint on the first line of Form1's constructor, and pressing F11 line by line to find which one, inInitializeComponent()
method, throws the exception. Hope this helps.There are two kinds of people in the world: those who can extrapolate from incomplete data.
-
Hi, The first thing I would look at is the
MissingManifestResourceException
. It seems that, in your WindowsFormsApplication1 project, there's a problem with a resource file. There can be several causes; could you check that, for every .resx file in your project, there is a .designer.cs file associated? IsForm1
marked as localizable? If so, there must also exist some relative resource files. Another thing to do would be to put a beakpoint on the first line of Form1's constructor, and pressing F11 line by line to find which one, inInitializeComponent()
method, throws the exception. Hope this helps.There are two kinds of people in the world: those who can extrapolate from incomplete data.
-
Hello, I am not an expert in C# but this site helped a lot creating a mini application that launches IE9, modifies some registry keys and bingo. Now, I have to add a few modifications but launch IE11. This is the code:
//Select the RegistryHive you wish to read from
RegistryKey key00 = RegistryKey.OpenRemoteBaseKey(RegistryHive.CurrentUser, "");//Select the path within the hive RegistryKey subkeyAA = key00.OpenSubKey("Software\\\\Microsoft\\\\Internet Explorer\\\\BrowserEmulation\\\\ClearableListData", true); string\[\] namesAA = subkeyAA.GetValueNames(); string YesUserFilter = ""; string NoUserFilter = ""; foreach (string name in namesAA) { if (name.Equals("UserFilter", StringComparison.CurrentCulture)) { // Found UserFilter YesUserFilter = "1"; break; } else { // No Found UserFilter NoUserFilter = "1"; } } if (YesUserFilter == "1") { int myValue = (int)subkeyAA.GetValue("UserFilter"); if (myValue != 0) { //Console.WriteLine("Setting the right GE Recommendation"); subkeyAA.SetValue("UserFilter", "company.com", RegistryValueKind.Binary); } } if (NoUserFilter == "1") { //Console.WriteLine("Setting the right GE Recommendation"); subkeyAA.SetValue("UserFilter", "company.com", RegistryValueKind.Binary); } subkeyAA.Close();
But the conditionals of YesUserFilter or NoUserFilter are blank, Thoughts ? Thanks for your help.
I fixed that part i had to change the string name variable to something else, it was bringing another value from the top. But on this section: subkeyAA.SetValue("UserFilter", "company.com", RegistryValueKind.Binary);
I get ArgumentException was unhandled {"The type of the value object did not match the specified RegistryValueKind or the object could not be properly converted."}
-
Hello, I am not an expert in C# but this site helped a lot creating a mini application that launches IE9, modifies some registry keys and bingo. Now, I have to add a few modifications but launch IE11. This is the code:
//Select the RegistryHive you wish to read from
RegistryKey key00 = RegistryKey.OpenRemoteBaseKey(RegistryHive.CurrentUser, "");//Select the path within the hive RegistryKey subkeyAA = key00.OpenSubKey("Software\\\\Microsoft\\\\Internet Explorer\\\\BrowserEmulation\\\\ClearableListData", true); string\[\] namesAA = subkeyAA.GetValueNames(); string YesUserFilter = ""; string NoUserFilter = ""; foreach (string name in namesAA) { if (name.Equals("UserFilter", StringComparison.CurrentCulture)) { // Found UserFilter YesUserFilter = "1"; break; } else { // No Found UserFilter NoUserFilter = "1"; } } if (YesUserFilter == "1") { int myValue = (int)subkeyAA.GetValue("UserFilter"); if (myValue != 0) { //Console.WriteLine("Setting the right GE Recommendation"); subkeyAA.SetValue("UserFilter", "company.com", RegistryValueKind.Binary); } } if (NoUserFilter == "1") { //Console.WriteLine("Setting the right GE Recommendation"); subkeyAA.SetValue("UserFilter", "company.com", RegistryValueKind.Binary); } subkeyAA.Close();
But the conditionals of YesUserFilter or NoUserFilter are blank, Thoughts ? Thanks for your help.
I also facing the same issue in the coding.. Can anyone help out in this issue