Windows Forms: Youtube Downloader in VB.NET

How to make a Youtube Downloader using Video Library in VB.Net. libvideo is a fast, clean way to download YouTube videos, It's fully portable and has no dependencies

Step 1Click New Project, then select Visual C# on the left, then Windows and then select Windows Forms Application. Name your project "VBYoutube" and then click OK

download youtube in c#Step 2: Right click on your project select Manage NuGet Packages -> Search libvideo -> Install

install video libraryStep 3: Design youtube download form as below

youtube downloader in

Step 4: Add code to handle download file

Imports System.IO
Imports VideoLibrary

Public Class Form1
    Private Sub btnDownload_Click(sender As Object, e As EventArgs) Handles btnDownload.Click
        If FolderBrowserDialog1.ShowDialog = DialogResult.OK Then
            lblStatus.Text = "Downloading..."
            Dim video = YouTube.Default.GetVideo(txtUrl.Text)
            File.WriteAllBytes(FolderBrowserDialog1.SelectedPath & video.FullName, video.GetBytes())
            lblStatus.Text = "Completed !"
        End If
    End Sub
End Class