ShowExplorerFileMenu – Hide or show Windows Explorer File menu

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


About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist