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
@@ -197,6 +199,24 @@ public void AddEventHandlers()
197
199
EventManager . AddEventHandler ( this , EventType . RestoreSession ) ;
198
200
}
199
201
202
+ /// <summary>
203
+ /// Sets a key in registry so that latest .NET browser control is used
204
+ /// </summary>
205
+ private void UseLatestBrowserControl ( )
206
+ {
207
+ try
208
+ {
209
+ String valueName = DistroConfig . DISTRIBUTION_NAME + ".exe" ;
210
+ String subKey = "Software\\ Microsoft\\ Internet Explorer\\ Main\\ FeatureControl\\ FEATURE_BROWSER_EMULATION\\ " ;
211
+ RegistryKey emu = Registry . CurrentUser . OpenSubKey ( subKey , true ) ;
212
+ {
213
+ Object value = emu . GetValue ( valueName ) ;
214
+ if ( value == null ) emu . SetValue ( valueName , 0 , RegistryValueKind . DWord ) ;
215
+ }
216
+ }
217
+ catch { } // No errors please...
218
+ }
219
+
200
220
/// <summary>
201
221
/// Loads the plugin settings
202
222
/// </summary>
You can’t perform that action at this time.
0 commit comments