Permalink
Browse files

Change Internet Explorer to no longer force IE7 compatibility mode.

  • Loading branch information...
1 parent 85d78fd commit 423a89fdaaea84d1a1a0b7bb98ff6c35c5dba05e @rmcardle rmcardle committed Mar 24, 2013
View
@@ -4,6 +4,7 @@
Fixed an exception or crash when choosing unnamed colors for themes.
Fixed possible error "Control does not support transparent background colors" when modifying themes.
Fixed changes to the active theme not being saved reliably.
+ Changed Internet Explorer to no longer force IE7 compatibility mode.
1.71 Beta 3 (2013-03-20):
Fixed issue MR-397 - Putty disappears from the screen
@@ -700,6 +700,8 @@ Namespace App
Dim SettingsSave As New Config.Settings.Save()
SettingsSave.Save()
+
+ IeBrowserEmulation.Unregister()
Catch ex As Exception
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strSettingsCouldNotBeSavedOrTrayDispose & vbNewLine & ex.Message, True)
End Try
@@ -60,8 +60,10 @@ Public Class frmMain
WindowList = New UI.Window.List
+ Tools.IeBrowserEmulation.Register()
+
Startup.GetConnectionIcons()
- App.Runtime.GetExtApps()
+ GetExtApps()
Windows.treePanel.Focus()
Tree.Node.TreeView = Windows.treeForm.tvConnections
@@ -0,0 +1,39 @@
+Imports System.IO
+Imports Microsoft.Win32
+
+Namespace Tools
+ Public Class IeBrowserEmulation
+ Private Const BrowserEmulationKey As String = "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"
+ Private Shared _previousIeBrowserEmulationValue As Integer = 0
+ Public Shared Sub Register()
+ Dim registryKey As RegistryKey = Registry.CurrentUser.OpenSubKey(BrowserEmulationKey, True)
+ If registryKey Is Nothing Then
+ Registry.CurrentUser.CreateSubKey(BrowserEmulationKey)
+ registryKey = Registry.CurrentUser.OpenSubKey(BrowserEmulationKey, True)
+ If registryKey Is Nothing Then Return
+ End If
+ Dim exeName As String = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName)
+ _previousIeBrowserEmulationValue = registryKey.GetValue(exeName, 0)
+ registryKey.SetValue(exeName, 11000, RegistryValueKind.DWord)
+ End Sub
+
+ Public Shared Sub Unregister()
+#If Not PORTABLE Then
+ Return
+#Else
+ Try
+ Dim registryKey As RegistryKey = Registry.CurrentUser.OpenSubKey(BrowserEmulationKey, True)
+ If registryKey Is Nothing Then Return
+ Dim exeName As String = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName)
+ If _previousIeBrowserEmulationValue = 0 Then
+ registryKey.DeleteValue(exeName)
+ Else
+ registryKey.SetValue(exeName, _previousIeBrowserEmulationValue, RegistryValueKind.DWord)
+ End If
+ Catch
+ End Try
+#End If
+ End Sub
+ End Class
+End Namespace
+
@@ -270,6 +270,7 @@
<Compile Include="Security\Security.Crypt.vb" />
<Compile Include="Security\Security.Impersonator.vb" />
<Compile Include="Security\Security.Save.vb" />
+ <Compile Include="Tools\IeBrowserEmulation.vb" />
<Compile Include="Tools\ReconnectGroup.Designer.vb">
<DependentUpon>ReconnectGroup.vb</DependentUpon>
</Compile>

0 comments on commit 423a89f

Please sign in to comment.