File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
External/Plugins/StartPage Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 12
12
using ProjectManager ;
13
13
using StartPage . Controls ;
14
14
using WeifenLuo . WinFormsUI . Docking ;
15
+ using Microsoft . Win32 ;
15
16
16
17
namespace StartPage
17
18
{
@@ -101,6 +102,7 @@ public void Initialize()
101
102
this . InitBasics ( ) ;
102
103
this . LoadSettings ( ) ;
103
104
this . AddEventHandlers ( ) ;
105
+ this . UseLatestBrowserControl ( ) ;
104
106
this . CreateMenuItem ( ) ;
105
107
}
106
108
@@ -196,6 +198,24 @@ public void AddEventHandlers()
196
198
EventManager . AddEventHandler ( this , EventType . RestoreSession ) ;
197
199
}
198
200
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
+
199
219
/// <summary>
200
220
/// Loads the plugin settings
201
221
/// </summary>
You can’t perform that action at this time.
0 commit comments