Object from Kazaa Lite (HARD) [SOLVED]
I just was wondering...on kazaa lite, if you go to My Kazaa Lite K++ which is basicall my shared documents. It shows all the files in the directory.
What i need to know is, what it actually shows them in...the VB equivelant
http://www.softwaremotion.com/images...creenshot.jpeg
and how to list them.
Re: Object from Kazaa Lite (HARD)
You could load them into a flexgrid, or you could pick them from a common dialog control. It depends what you want to do with them The flexgrid is the most customizable, but a listview might also be in order.
Re: Object from Kazaa Lite (HARD)
Well what i want it to do is list all the files in a directory, tell me the file name, size and if possible the type of file it is e.g Application, Picture etc. and i want it to refresh every 15 minutes, incase new files have been added to the directory.
Re: Object from Kazaa Lite (HARD)
Use the File System Objsect control. While it won't parse the mp3 infor, it will give you date and size info. With a little more work, you could get the type of file.
Re: Object from Kazaa Lite (HARD)
i cannot seem to find the File System Object control :ehh:
Re: Object from Kazaa Lite (HARD)
Add a reference to:
- Microsoft Scripting Runtime (scrrun.dll)
Re: Object from Kazaa Lite (HARD)
Quote:
Originally Posted by boku
What i need to know is, what it actually shows them in...the VB equivelant
You can duplicate Kazaa's user interface by using the ListView control. You can add it to your project by clicking -
Project > Components > Controls tab > checking "MS Windows Common Controls 6.0"
Re: Object from Kazaa Lite (HARD)
Yeah thats kool i got that now. Your gna think im a dumbass, but how do i use it lol, all i got is the column titles and how to add files:
VB Code:
Dim sharedfilesdir As String
sharedfilesdir = Dir(lblSharedFiles.Caption & "\*.*")
While sharedfilesdir <> ""
ListView1.ListItems.Add , , sharedfilesdir
sharedfilesdir = Dir()
Wend
But what i want now is how to get the type of file under the correct column and the files size.
Re: Object from Kazaa Lite (HARD)
Here is how you use the listview control.
VB Code:
Option Explicit
Private Sub Form_Load()
Dim i As Integer
Dim itmLV As ListItem
ListView1.FullRowSelect = True
ListView1.GridLines = False
ListView1.HideSelection = False
ListView1.HoverSelection = False
ListView1.LabelEdit = lvwManual
ListView1.MultiSelect = False
ListView1.View = lvwReport
For i = 1 To 5
ListView1.ColumnHeaders.Add , , "Col " & i, (ListView1.Width / 5) - 70
Next
For i = 1 To 25
Set itmLV = ListView1.ListItems.Add(, , "Item " & i)
itmLV.SubItems(1) = "Sub 2"
itmLV.SubItems(2) = "Sub 3"
itmLV.SubItems(3) = "Sub 4"
itmLV.SubItems(4) = "Sub 5"
Set itmLV = Nothing
Next
End Sub
Re: Object from Kazaa Lite (HARD)
OK thnx :) but how do i click on a single file and have the properties that you see when you right click a file appear in a textbox? :ehh:
Re: Object from Kazaa Lite (HARD)
If your using the FSO object then you can just add a few 0 width lvw colums and add the file properties from
the FSO for the file when your loading the lvw. Then when you select a listview item you can take
the hidden columns text and place it in a textbox.
Re: Object from Kazaa Lite (HARD)
Ok i dont know what FSO is but i dont think im using it. Could you be more precise?
I have a listview object (in report view) and a text box (which is multiline)
In the list view i have the headers "Title", "Size" and "Type". Only title is done so far.
BUT when i click on the file in the listview object i would like the rest of the file properties to come up like, "Year", "Artist", "Bitrate" etc.
Re: Object from Kazaa Lite (HARD)
You should have columns for each of these and load them when the lvw is loaded.
FSO = File System Object, from the scripting reference posted earlier.