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