OMG FML Please help me yet again

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
8 posts Page 1 of 1
Contributors
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

OMG FML Please help me yet again
muttley1968
Right i have a listview it has sevral colums but i want to refrence the data in just one of them for example the list view has


something1|something2|something3|something4
--------------------------------------------
something1|something2|path to fl|something4
something1|something2|path to fl|something4
something1|something2|path to fl|something4
something1|something2|path to fl|something4
something1|something2|path to fl|something4
something1|something2|path to fl|something4


i want to click and it naviates to the path section
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

that was a very good explination sorry right i am making a media player and i have artis genre and all in diffrent feilds but one of them is the path and i dont know how to just reffrence a single colum soo i can use the code

Axwindowsmediaplayer1.url = listview1.seleteditem
becuase thta would need to point to the path
User avatar
sergeant
Just Registered
Just Registered
Posts: 5
Joined: Wed Feb 22, 2012 2:13 am

I would like to help but wachya mean?
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

right you know list view can hold colum with diffrent info one of them help like this c:/users/something/musc.mps and the rest of them the info about that track and i want to make it soo if you change the selected item it plays it but how because i dont know how to make it know the path
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: OMG FML Please help me yet again
MrAksel
AxWindowsmediaplayer1.URL = ListView1.SelectedItems(0).SubItems(1).Text
Might work, try changing '1' to '2' if it doesn't work.
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

MRAksel thanks very mutch you code gave me a brain wave soo i tried this i had dimed this earsyer soo i used it
Code: Select all
 
Dim a As Integer
        If a = 0 Then
            a = ListView1.Items.Count()
        End If
        AxWindowsMediaPlayer1.URL = ListView1.Items.Item(a - 1).SubItems(4).Text()
but that plays the same song over no matter what you click on
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

sorry for double post but forgot to add to the end any ideas how to fix that :P ?...
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Code: Select all
AxWindowsMediaPlayer1.URL = ListView1.SelectedItems(0).SubItems(4).Text()
That works, why did you include that 'a' ?
Just remove
Code: Select all
Dim a As Integer
        If a = 0 Then
            a = ListView1.Items.Count()
        End If
To everyone that thinks this is a bump, its not because the topic wasn't solved.
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
8 posts Page 1 of 1
Return to “Coding Help & Support”