Youtube Video Player

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
5 posts Page 1 of 1
Contributors
User avatar
un kn0 wn
VIP - Donator
VIP - Donator
Posts: 269
Joined: Mon Mar 29, 2010 6:12 pm

Youtube Video Player
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
You do not have the required permissions to view the files attached to this post.
User avatar
jeezy09
VIP - Donator
VIP - Donator
Posts: 25
Joined: Wed Mar 31, 2010 1:51 am

Re: Youtube Video Player
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
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

Re: Youtube Video Player
zachman61
same here jeezy
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
Livengood
Serious Programmer
Serious Programmer
Posts: 445
Joined: Tue Feb 16, 2010 6:24 am

Re: Youtube Video Player
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
Image
User avatar
un kn0 wn
VIP - Donator
VIP - Donator
Posts: 269
Joined: Mon Mar 29, 2010 6:12 pm

Re: Youtube Video Player
un kn0 wn
srry ill see if there is another way cus i tried it first and it worked maybe i made a mistake.
5 posts Page 1 of 1
Return to “Tutorials”