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. Listbox

Listbox

Scheduled Pinned Locked Moved Visual Basic
questionperformance
3 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.
  • S Offline
    S Offline
    suesquestion
    wrote on last edited by
    #1

    How do I code the listbox select item to not change when the choice is incorrect. I'm doing a simulation of driving and the listbox has Park, Reverse, Drive and Neutral and you are not allowed to change gears when there is speed my code is allowing the change and I get the message box up twice how do I stop it from changing and only have the message box up once?

    M 1 Reply Last reply
    0
    • S suesquestion

      How do I code the listbox select item to not change when the choice is incorrect. I'm doing a simulation of driving and the listbox has Park, Reverse, Drive and Neutral and you are not allowed to change gears when there is speed my code is allowing the change and I get the message box up twice how do I stop it from changing and only have the message box up once?

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

      You may disable the listbox: ListBox1.Enabled=False

      G 1 Reply Last reply
      0
      • M MohammadAmiry

        You may disable the listbox: ListBox1.Enabled=False

        G Offline
        G Offline
        Garner T
        wrote on last edited by
        #3

        How about?: If speed > 0 then ListBox1.Enabled = False

        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