VLMenuPlus Reference

MethodGetDefaultPictureEx

See Also See Also Applies To Applies To

Returns the default picture object corresponding to specified menu caption. If there is no default picture, it returns nothing.

 

Syntax

object.GetDefaultPictureEx(ByVal sMenuCaption As String, ByVal eLang as clLanguage)

 

The GetDefaultPicture method syntax has these parts:

Part Description
object An object expression that evaluates to an object of VLMenuPlus type.
sMenuCaption A menu caption string.
eLang Language of the specified menu caption. This parameter will be used to select the default picture collection that will be used for retrieving the picture. The vaid values for eLang are as specified in the setting of Language property.

 

Remarks

VLMenuPlus provides default bitmaps for a large number of commonly used menu items. You can use this function to access any of these bitmaps.

Typically you will use this function to get the picture object when your menu caption is slightly different from one assumed by VLMenuPlus.

Sample


   Private Sub VLMenuPlus1_SetMenuItemAttributes(ByVal mnuItem As CMenuItem)
      If (mnuItem.Caption = "Create") Then
         With VLMenuPlus1
            Set mnuItem.Picture = .GetDefaultPictureEx("NEW", vlLanguage.English)
         End With
      End If
   End Sub

This sample shows how to use default bitmap when menu caption is slightly different from the menu caption listed in default bitmap list.