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. little bit of help needed

little bit of help needed

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

    hello whom ever, im creating a playlist program in vb.net. i am trying to add a file name to a list box from my documents. the thing is im almost there, the file name appears at the top of the form as the form title but i need it in the list box. it would be greatly appreciated if you could try and help me out. heres a snipit of the code. cheers Me.openFileDialog1 = New System.Windows.Forms.OpenFileDialog openFileDialog1.ShowDialog() Dim name As String = openFileDialog1.FileName Dim contain As String = openFileDialog1.FileName listBox1.Text = openFileDialog1.FileName Me.Text = name ''contain.close()

    U 1 Reply Last reply
    0
    • P peteyshrew

      hello whom ever, im creating a playlist program in vb.net. i am trying to add a file name to a list box from my documents. the thing is im almost there, the file name appears at the top of the form as the form title but i need it in the list box. it would be greatly appreciated if you could try and help me out. heres a snipit of the code. cheers Me.openFileDialog1 = New System.Windows.Forms.OpenFileDialog openFileDialog1.ShowDialog() Dim name As String = openFileDialog1.FileName Dim contain As String = openFileDialog1.FileName listBox1.Text = openFileDialog1.FileName Me.Text = name ''contain.close()

      U Offline
      U Offline
      Uber1
      wrote on last edited by
      #2

      You have to change the following line of code. Change: listBox1.Text = openFileDialog1.FileName To: listBox1.Items.Add(openFileDialog1.FileName) Have a great day.

      Recreating the wheel is the best way to appreciate what the previous coders have gone through to get you where you are at now.

      P 1 Reply Last reply
      0
      • U Uber1

        You have to change the following line of code. Change: listBox1.Text = openFileDialog1.FileName To: listBox1.Items.Add(openFileDialog1.FileName) Have a great day.

        Recreating the wheel is the best way to appreciate what the previous coders have gone through to get you where you are at now.

        P Offline
        P Offline
        peteyshrew
        wrote on last edited by
        #3

        thanks matey you'll be pleased to know i figured that out not too many seconds after i posted that message, stupid me. if your not to busy i could do with a bit more help on a couple of things. how can i assign a command to select all items in the list and how do i move up and down the list

        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