ni code sourcenya
download filenya disini
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If c1.Checked = True Then
Dim value1 As String = TextBox1.Text
sock.Movie = value1.Replace("watch?v=", "v/")
sock.Play()
ElseIf c2.Checked = True Then
sock.Movie = TextBox1.Text
sock.Play()
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
brw.Navigate("http://www.youtube.com/results?search_query=" & TextBox2.Text)
End Sub
Private Sub brw_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs) Handles brw.ProgressChanged
Dim el As HtmlElementCollection = brw.Document.All
For Each dt As HtmlElement In el
ComboBox1.Items.Add(dt.GetAttribute("href"))
ComboBox1.Items.Remove("http://s.ytimg.com/yts/cssbin/www-core-vflo845xA.css")
ComboBox1.Items.Remove("http://www.youtube.com/opensearch?locale=en_US")
ComboBox1.Items.Remove("http://s.ytimg.com/yts/img/favicon-vfldLzJxy.ico")
ComboBox1.Items.Remove("//s.ytimg.com/yts/img/favicon_32-vflWoMFGx.png")
ComboBox1.Items.Remove("http://www.youtube.com/")
ComboBox1.Items.Remove("http://www.youtube.com/upload")
ComboBox1.Items.Remove("http://www.youtube.com/chanels")
ComboBox1.Items.Remove("http://www.youtube.com/sport")
ComboBox1.Items.Remove("http://www.youtube.com/sports")
ComboBox1.Items.Remove("http://www.youtube.com/music")
ComboBox1.Items.Remove("http://www.youtube.com/gaming")
ComboBox1.Items.Remove("http://m.youtube.com/results?search_query=" & TextBox2.Text)
ComboBox1.Items.Remove("http://s.ytimg.com/yts/cssbin/www-results-vflQeXgfX.css")
ComboBox1.Items.Remove("https://accounts.google.com/ServiceLogin?passive=true&continue=http%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26feature%3Dsign_in_button%26hl%3Den_US%26next%3D%252Fresults%253Fsearch_query%253D")
Next
End Sub
Private Sub ComboBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.Click
Dim val As String = ComboBox1.Text
sock.Movie = val.Replace("watch?v=", "v/")
sock.Play()
End Sub
Private Sub c1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles c1.CheckedChanged
c2.Checked = False
End Sub
Private Sub c2_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles c2.CheckedChanged
c1.Checked = False
End Sub
Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click
Me.Close()
End Sub
End Class
Tidak ada komentar:
Posting Komentar