Skip to content

Commit 9b8c9dd

Browse files
committed
Fixes #794
1 parent ced9dac commit 9b8c9dd

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

External/Plugins/StartPage/PluginMain.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using ProjectManager;
1313
using StartPage.Controls;
1414
using WeifenLuo.WinFormsUI.Docking;
15+
using Microsoft.Win32;
1516

1617
namespace StartPage
1718
{
@@ -101,6 +102,7 @@ public void Initialize()
101102
this.InitBasics();
102103
this.LoadSettings();
103104
this.AddEventHandlers();
105+
this.UseLatestBrowserControl();
104106
this.CreateMenuItem();
105107
}
106108

@@ -196,6 +198,24 @@ public void AddEventHandlers()
196198
EventManager.AddEventHandler(this, EventType.RestoreSession);
197199
}
198200

201+
/// <summary>
202+
/// Sets a key in registry so that latest .NET browser control is used
203+
/// </summary>
204+
private void UseLatestBrowserControl()
205+
{
206+
try
207+
{
208+
String valueName = DistroConfig.DISTRIBUTION_NAME + ".exe";
209+
String subKey = "Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION\\";
210+
RegistryKey emu = Registry.CurrentUser.OpenSubKey(subKey, true);
211+
{
212+
Object value = emu.GetValue(valueName);
213+
if (value == null) emu.SetValue(valueName, 0, RegistryValueKind.DWord);
214+
}
215+
}
216+
catch {} // No errors please...
217+
}
218+
199219
/// <summary>
200220
/// Loads the plugin settings
201221
/// </summary>

0 commit comments

Comments
 (0)