ShowExplorerFileMenu – Hide or show Windows Explorer File menu

' Hide/Show the Explorer's (Windows Explorer and IE) File menu' NOTE: this routine requires the SetRegistryValue,'  DeleteRegistryValue and CheckRegistryValue routines,' that you can find in the CodeBank under the Windows section.'' Example:'   ' hide the File menu (at the next execution of IE or Windows Explorer)'   ShowExplorerFileMenu False'   ' show it again'   ShowExplorerFileMenuPublic Sub ShowExplorerFileMenu(Optional ByVal bShow As Boolean = True)    Dim sKey As String    Const HKEY_CURRENT_USER = &H80000001    sKey = "SoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer"        If bShow Then        ' delete the value whose setting hides the File menu        DeleteRegistryValue HKEY_CURRENT_USER, sKey, "NoFileMenu"    Else        ' if the Key doesn not exist        If CheckRegistryKey(HKEY_CURRENT_USER, sKey) = False Then            ' create the key            CreateRegistryKey HKEY_CURRENT_USER, sKey        End If        ' create and set the value to hide the File menu        SetRegistryValue HKEY_CURRENT_USER, sKey, "NoFileMenu", "1"    End If    End Sub

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: