Page 1 of 1

Youtube Video Player

Posted: Mon Jun 14, 2010 6:43 pm
by un kn0 wn
hello

Tutorial Name: Youtube Video Player:
Tutorial Difficulty: 1(Easy)
Tutorial Requirements: Vb 2008, A Brain

In this tut im going to show you how to make a youtube video player in vb 2008. This tutorial is very simple as long as you follow the tutorial as the code is onlike like 3 lines.

Now go to your toolbox and on the rightclick menu click choose items.

Now Insert The Following Controls:

- Panel (Dock = Bottom)
- Button ( Inside the panel)
- Textbox (Inside the panel)
- WindowsMediaPlayer (Dock = Fill)
Code: Select all
Textbox

Name: Txt_URL
Code: Select all
Button

Name: Cmd_Play
Text: Play
Now double click on the button (Cmd_Play) and in the code type:
Code: Select all
If Not TXT_URL.Text = "" Then
Dim VidURL As String = TXT_URL.Text.Replace("/watch?v=", "/v/")
AxWindowsMediaPlayer1.URL = VidURL
Else
MsgBox("There is no url in the box, Please type a url and try again", MsgBoxStyle.Information, "No Video To Play")
End If
Now Save and debug the project and try it.

Souurce and demo download: Click Here (Try Attachment if this doesnt work)

Enjoy

Re: Youtube Video Player

Posted: Mon Jun 14, 2010 9:18 pm
by jeezy09
this is a pretty cool idea man but it didnt work for me, after pasting the link it just said connecting and then ready but wouldnt play lol

Re: Youtube Video Player

Posted: Mon Jun 14, 2010 10:24 pm
by zachman61
same here jeezy

Re: Youtube Video Player

Posted: Tue Jun 15, 2010 6:47 am
by Livengood
un kn0 wn wrote:
hello

Tutorial Name: Youtube Video Player:
Tutorial Difficulty: 1(Easy)
Tutorial Requirements: Vb 2008, A Brain

In this tut im going to show you how to make a youtube video player in vb 2008. This tutorial is very simple as long as you follow the tutorial as the code is onlike like 3 lines.

Now go to your toolbox and on the rightclick menu click choose items.

Now Insert The Following Controls:

- Panel (Dock = Bottom)
- Button ( Inside the panel)
- Textbox (Inside the panel)
- WindowsMediaPlayer (Dock = Fill)
Code: Select all
Textbox

Name: Txt_URL
Code: Select all
Button

Name: Cmd_Play
Text: Play
Now double click on the button (Cmd_Play) and in the code type:
Code: Select all
If Not TXT_URL.Text = "" Then
Dim VidURL As String = TXT_URL.Text.Replace("/watch?v=", "/v/")
AxWindowsMediaPlayer1.URL = VidURL
Else
MsgBox("There is no url in the box, Please type a url and try again", MsgBoxStyle.Information, "No Video To Play")
End If
Now Save and debug the project and try it.

Souurce and demo download: Click Here (Try Attachment if this doesnt work)

Enjoy
sorry man it doesnt work, the replace code isnt working - try this - viewtopic.php?f=53&t=1874

and the videos dont play because the Flv, so you have to use a flash player... lol other than that i look and the url does open the video cooll;, so if you fix those problems you will have a youtube video player :D

- Livengood

Re: Youtube Video Player

Posted: Tue Jun 15, 2010 4:31 pm
by un kn0 wn
srry ill see if there is another way cus i tried it first and it worked maybe i made a mistake.