Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Can a listbox do this?

Can a listbox do this?

Scheduled Pinned Locked Moved Visual Basic
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KaKa
    wrote on last edited by
    #1

    Hi, Is this possible for a listbox? When the listitems of the listbox are selected and right-clicked, a context menu appears. Then, when the user right clicks on the empty space inside the listbox, the context menu will not appear even though an item is still selected. If possible, what listbox event is used?

    N 1 Reply Last reply
    0
    • K KaKa

      Hi, Is this possible for a listbox? When the listitems of the listbox are selected and right-clicked, a context menu appears. Then, when the user right clicks on the empty space inside the listbox, the context menu will not appear even though an item is still selected. If possible, what listbox event is used?

      N Offline
      N Offline
      noshaba mariam
      wrote on last edited by
      #2

      Hi, U need to create menu on the form and make it invisible. Then on Mouse Down event of listbox check the value of button. in this way Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = vbPopupMenuRightButton Then Me.PopupMenu Me.file, vbPopupMenuCenterAlign End If End Sub Noshaba

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups