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
  1. Home
  2. General Programming
  3. Visual Basic
  4. Middle Button scroll in combo box

Middle Button scroll in combo box

Scheduled Pinned Locked Moved Visual Basic
4 Posts 3 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    i need to scroll using my middle button using a mouse in a combo box,but i'am unable to do so.please can any one find a solution.

    M T 2 Replies Last reply
    0
    • L Lost User

      i need to scroll using my middle button using a mouse in a combo box,but i'am unable to do so.please can any one find a solution.

      M Offline
      M Offline
      mikasa
      wrote on last edited by
      #2

      Is this .NET or VB6?

      L 1 Reply Last reply
      0
      • M mikasa

        Is this .NET or VB6?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        it is vb 6.0

        1 Reply Last reply
        0
        • L Lost User

          i need to scroll using my middle button using a mouse in a combo box,but i'am unable to do so.please can any one find a solution.

          T Offline
          T Offline
          Tim McCurdy
          wrote on last edited by
          #4

          Ok, you need to use the API function "SendMessage" (i.e. SendMessageA). I suggest you download the API Guide (Do a search on API Guide on the Internet). The Scrollbar works by sending the WM_VSCROLL message. Now, you'll have to SubClass the Window you want to handle the Wheel Mouse on. You can do this by intercepting the WM_MOUSEWHELL Message. Again, all this is contained in the API Guide. If you need an example of SubClassing, I can help but I don't have a lot of time to explain it. Also, Subclassing is 100 times easier to do in .NET than VB6. After you have the WM_MOUSEWHEEL intercepted, just pass the message for it to scroll Up or Down by passing a "0" or "1" to the LParam of the SendMessage (it's either that or the WParam, can't remember off the top of my head). Call SendMessage(lstBoxHandle, WM_VSCROLL, 1, 0) Call SendMessage(lstBoxHandle, WM_VSCROLL, 0, 0) Not all those who are lost are looking to be found. But of those who are lost and those who are found, all are looking for something higher than themselves.

          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