thing with wmp in vb6

rob2k9
10-18-2009, 08:48 PM
I have a very good tut site and well i got some one to create for us an app for our members to view our tuts on with out having to open there browser.

But the guy that made it deleted it off our server and now membres cant download it or use it and well i cant get a hold of him. :huh:

So i started trying to create one in vb6 but i am not very good :( i got my media player working in the app but i can only get it to open one file.

Is there any way i can get it to open multiple files from a drop down box or have it collect the videos from my server and then put theme in to a menu or some thing like that

any help wood be great

ps: get revising coz if i cant get it to work i will be back on this form to get one off you to do it and yes will pay :D

vb5prgrmr
10-18-2009, 11:10 PM
First part is easy... Create a text file that has the title you want to display in the drop down followed by a delimeter of some sort, like a comma, which is then followed by the full url to the file to view. Put that file somewhere on your server. Next up is the URLDownloadToFile API which will allow you to download that text file. Then you can open this file up and read its contents into a couple of arrays or whatever.

As for paying someone to do this I would suggest that you use one of the sites like http://www.rentacoder.com that have well established methods for handling work for hire.



Good Luck

rob2k9
10-19-2009, 04:40 PM
thanks for your replay is there any way you can show me how i wood do the first thing you seed

i realy need to get this up and runing i have lost 20 members so far becouse of this

vb5prgrmr
10-19-2009, 10:34 PM
Okay, to show you how you would do those things I said, see this for the API..

http://vbnet.mvps.org/index.html?code/internet/urldownloadtofilenocache.htm

Then here is one way to parse the file based upon my suggestion of title,url of the files contents...

Option Explicit
Dim TitleToDisplay() As String, URL() As String

Public Sub ReadFileIntoArrays()
Dim FName As String, FNumb As Integer
Dim FileContents As String, LineArray() As String
Dim LowerBoundsOfArray As Integer, UpperBoundsOfArray As Integer
Dim ForLoopCounter As Integer

FName = "Path file name of where you saved the file from the URLDownloadToFile API"
FNumb = FreeFile

'read whole file in at once
Open FName For Input As #FNumb
FileContents = Input(FNumb, FileLen(FName))
Close #FNumb

'split the files individual lines into an array
LineArray = Split(FileContents, vbNewLine)

'get the bounds of this array
LowerBoundsOfArray = LBound(LineArray)
UpperBoundsOfArray = UBound(LineArray)

'now, set up the two arrays that will work together for the users display
ReDim TitleToDisplay(LowerBoundsOfArray To UpperBoundsOfArray) As String
ReDim URL(LowerBoundsOfArray To UpperBoundsOfArray) As String

'parse out each line of the array into it distinctive parts
For ForLoopCounter = LowerBoundsOfArray To UpperBoundsOfArray
TitleToDisplay(ForLoopCounter) = Left(LineArray(ForLoopCounter), Instr(1, LineArray(ForLoopCounter), ",") - 1))
URL(ForLoopCounter) = Mid(LineArray(ForLoopCounter), Instr(1, LineArray(ForLoopCounter), ",") + 1)
Next ForLoopCounter
End Sub


Then all you need to do is to enumerate through the TitleToDisplay Array to load your menu list/combo/list/etc... Then depending upon which method you use to display the titles you more than likely could use the index to match up to the index of the URL array.




Good Luck

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum