Public Class Form1
Dim videoid As String = ""
Dim adres As String = ""
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If Mid(TextBox1.Text, 1, 31) <> "http://www.youtube.com/watch?v=" Then
MsgBox("Lütfen video adresini doğru girin.", vbCritical, "HATA")
TextBox1.Text = ""
TextBox1.Select()
Exit Sub
End If
Dim videoid As String = ""
Dim adres As String = ""
videoid = Mid(TextBox1.Text, 32, 11)
adres = "http://www.youtube.com/results?search_query=http%3A%2F%2Fwww.youtu.be%2F" & videoid
Dim talep As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(adres)
Dim cevap As System.Net.HttpWebResponse = talep.GetResponse()
Dim okuyucu As System.IO.StreamReader = New System.IO.StreamReader(cevap.GetResponseStream())
Dim kaynakkodu As String = okuyucu.ReadToEnd
If InStr(kaynakkodu, "search-message") = 0 Then
MsgBox("Videonuzun kısa linki : http://www.youtu.be/" & videoid & vbNewLine & vbNewLine & "Videonuz youtube'de indexlenmiş.

", vbInformation, "Bilgi")
Else
MsgBox("Videonuzun kısa linki : http://www.youtu.be/" & videoid & vbNewLine & vbNewLine & "Videonuz youtube'de indexlenmemiş.

", vbInformation, "Bilgi")
End If
End Sub
Private Sub TextBox1_GotFocus(sender As Object, e As EventArgs) Handles TextBox1.GotFocus
TextBox1.Text = ""
End Sub
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
End Sub
End Class