Your technology certification is waiting. Enroll in Cloud Class ®
Private Const MIIM_STRING = &H40
Private Type MENUITEMINFO
cbSize As Long
fMask As Long
fType As Long
fState As Long
wID As Long
hSubMenu As Long
hbmpChecked As Long
hbmpUnchecked As Long
dwItemData As Long
dwTypeData As String
cch As Long
Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
Private Declare Function SetMenuItemInfo Lib "user32" Alias "SetMenuItemInfoW" (ByVal hMenu As Long, ByVal uItem As Long, ByVal fByPosition As Long, lpmii As MENUITEMINFO) As Long
Private Sub Form_Load()
Dim hMenu As Long, hSubMenu As Long, MII As MENUITEMINFO
'get the handle of the current menu
hMenu = GetMenu(Me.hwnd)
'get the handle of the first submenu
hSubMenu = GetSubMenu(hMenu, 0)
'initialize the structure
MII.cbSize = Len(MII)
MII.fMask = MIIM_STRING
MII.dwTypeData = StrConv("H" & ChrW(7879) & " th" & ChrW(7889) & "ng", vbUnicode)
SetMenuItemInfo hSubMenu, 0, True, MII
Open in new window
This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.