ctlUniMenu ControlTransforms a standard VB6 menu into an Unicode Icon menu;
|
Name | Description |
---|---|
eUniMenuStringMode | Menu string mode |
Name | Description |
---|---|
OnOwnerDraw | Raised when a menu item is about to be drawn. Change properties of this event for translating items at runtime or assign icons to menu items. This event is called the first time for measuring the item then every time the item needs to be refreshed |
Name | Type | Description |
---|---|---|
CustomFontFace | (String) | Permits you to customize the font used for the menu without changing the one used by Windows. You can for example set the font to "Arial Unicode MS" for displaying Vietnamese and Chinese words in the menu. If this property is blank the control will use the one used by the system. |
ExtSepBackColor | (OLE_COLOR) | Gets or sets a custom background color for extended separators |
ExtSepForeColor | (OLE_COLOR) | Gets or sets a custom text color for an extended separator |
FadeBackground | (Boolean) | Gets or sets the ability to fade the background of menu popups |
FadeExtSep | (Boolean) | Gets or sets the ability to fade the extended separator |
FadeLeftBand | (Boolean) | Gets or sets the ability to fade the left band background color |
FullSelector | (Boolean) | |
IconDim | (Integer) | Gets or sets the default size of item images |
ImageArray | (Collection) | Permits you to specify a Collection of StdPictures to display automatically in menu items when you configure them at design time. See remarks... |
LeftBand | (Boolean) | Gets or sets the ability to show a left band in an alternate color |
LeftBandBackColor | (OLE_COLOR) | Gets or sets a custom background color for the left band |
LeftBandSeparators | (Boolean) | Gets or sets the ability to show a vertical line between the left band (contains icons) and the text |
MenuBackColor | (OLE_COLOR) | Gets or sets the background color for menu popups |
MenubarBackColor | (OLE_COLOR) | Gets or sets the menubar background color |
MenubarForeColorDisabled | (OLE_COLOR) | Gets or sets the text color of menubar disabled items |
MenubarForeColorNormal | (OLE_COLOR) | Gets or sets the text color of menubar "normal" items (not selected and not disabled) |
MenuForeColorDisabled | (OLE_COLOR) | Gets or sets the text color for disabled menu items |
MenuForeColorNormal | (OLE_COLOR) | Gets or sets the text color for menu "normal" menu items (not selected and not disabled) |
OwnerDrawState | (eOwnerDrawState) | Gets the OwnerDraw status, by checking this flag you can load items (icons or images) only when needed |
RightToLeft | (Boolean) | Gets or sets the ability to show bidirectional text on the control |
RoundSelector | (Boolean) | Gets or sets the ability to use rounded borders for the item selector |
SelectorBackColor | (OLE_COLOR) | Gets or sets the background color of menu selectors |
SelectorForeColor | (OLE_COLOR) | Gets or sets the text color for selected items |
SelectorStyle | (eCtlButtonStyle) | Gets or sets the style of the selector |
Separators3D | (Boolean) | Gets or sets the ability to show 3D separators lines or not |
StringMode | (eUniMenuStringMode) | Specify the type of encoding used by menu items |
Name | Type | Description |
---|---|---|
Attach | Starts the custom menu management by the control, you can optionally refresh the menubar if you specify a custom color for it in the control properties | |
Detach | Terminates the custom menu management by tyhe control | |
Refresh | Refreshes the entire menu; use this function when you need to translate main menu items (items on the menubar) because the control cannot refresh them automatically when you change them |
mnuFile.Caption = clsCommonWrapper.StrToHex(myUnicodeString)
mnuFile.Caption = clsCommonWrapper.StrToUTF8(myUnicodeString)
ctlMenu.Detach
'<...Do your translations to the menu and to the Title of your Form...>
ctlMenu.Attach
mnuItem1.Caption=oCommonWrapper.StrToHex(UTF16String)
Private Sub ctlUTF8Menu1_OnOwnerDraw( _
sItemText As String, _
oItemPic As stdole.StdPicture, _
iItemPicWidth As Integer, _
iItemPicHeight As Integer, _
bItemPicTransp As Boolean, _
ByVal bItemSelected As Boolean)
Select Case sItemText
Case Item1.Caption
Set oItemPic = ctlImageBag1.GetPictureClone(epics_first)
Case Item2.Caption
Set oItemPic = ctlImageBag1.GetPictureClone(epics_second)
End Select
End Sub