Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 131,603 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,127 people online right now. Registration is fast and FREE... Join Now!




how to save media file played in wmp?

 
Reply to this topicStart new topic

how to save media file played in wmp?

narmer93
post 9 Oct, 2008 - 05:08 AM
Post #1


D.I.C Head

**
Joined: 13 Mar, 2008
Posts: 236



Thanked 1 times
My Contributions


hi,i made a simple project with a wmp and a txtbox
i can insert the url of a media file and press f5 and it starts playing,sometimes this url is a link from the internet not from the computer.if it was from the internet,so how can i save (download)it to the computer?.And how can i make it extract the media url from the link?
if i have an mp3 file link from 4shared.how can i make it extract the url of the media file and play it and an option to download it ?
well the way i thought of is to view the source of the file and search for a link with name starting with someting and then set it as url of wmp and play it and have an option to download it.
is it possible?.is there a better way to do this?
i hope i am clear enough


oh,i've found a part of the code
TextBox1.Text = WebBrowser1.DocumentText
i will make the link be opened by a webbrowser and then view the code
now the part i need is how to extract the url of the audio file and play it and then i will look for a way to download it after that.

This post has been edited by narmer93: 9 Oct, 2008 - 05:56 AM
User is offlineProfile CardPM

Go to the top of the page


gbertoli3
post 9 Oct, 2008 - 06:15 AM
Post #2


DIC at Heart + Code

Group Icon
Joined: 23 Jun, 2008
Posts: 1,024



Thanked 16 times

Dream Kudos: 950
My Contributions


Take a look at the WebClient class.

System.Net.WebClient...
User is offlineProfile CardPM

Go to the top of the page

narmer93
post 9 Oct, 2008 - 07:03 AM
Post #3


D.I.C Head

**
Joined: 13 Mar, 2008
Posts: 236



Thanked 1 times
My Contributions


i guess u mean
imports System.Net.WebClient
and after i do it,what next?
and how can i make it search the link i want to find,and if it found it ,mark til the end of the line except 2 characters( " & ; )
how can i make this?i don't think i will have trouble with copying the selected text and and playing it.
well.i can now use richtectbox1.find("") to select some of the text,but how can i make it select the rest of the text until the first ( " )? or with selecting a number of characters after the selected text?
thanks in advance.

This post has been edited by narmer93: 9 Oct, 2008 - 08:37 AM
User is offlineProfile CardPM

Go to the top of the page

gbertoli3
post 9 Oct, 2008 - 02:12 PM
Post #4


DIC at Heart + Code

Group Icon
Joined: 23 Jun, 2008
Posts: 1,024



Thanked 16 times

Dream Kudos: 950
My Contributions


Here is how to download a file
vb

Private Sub DownloadFile(ByVal url As String)
    Dim client As New System.Net.WebClient()
    client.DownloadFile(url, "Destination")
End Sub


Hope this helps
User is offlineProfile CardPM

Go to the top of the page

narmer93
post 15 Oct, 2008 - 05:17 AM
Post #5


D.I.C Head

**
Joined: 13 Mar, 2008
Posts: 236



Thanked 1 times
My Contributions


still not working
well more important is if i could select some text in the rtb using richtextbox.find("something")
how can i make it automatically select some text before it and after it till the end of the line except 2 characters? and before the selected text with about 10 characters?

This post has been edited by narmer93: 15 Oct, 2008 - 05:24 AM
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/20/08 04:08AM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month