Retrieves or sets a value that indicates the item's index image.
Type | Description | |||
Long | A long expression that that indicates the item's index image. |
By default, when a new item is added to the menu no image is associated. Use the Image property to associate an image to an item.
The following sample shows how to add an item:
With PopupMenu1.Items .Add("Auto saving", Default, 1234).Image = 0 End With
The following sample shows how to simulate an item of check type using your own images:
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If (Button = 2) Then Dim nID As Long nID = PopupMenu1.ShowAtCursor If (nID = 1234) Then PopupMenu1.Command(1234).Image = (PopupMenu1.Command(1234).Image + 1) Mod 2 End If End If End Sub