Windows Form

Embed And Play YouTube Videos In C# Application

hi there;
I’ll show you how to play a youtube video in C# Form Application without using Shockwave Flash Player. Youtube had support flash play previous but now It does not support it. So for playing the video I used webBrowser component.

Let’s start creating project. Click File / New /Project in Visual Studio. Then Create Windows Form Application.

I created the project with Label, Button, TextBox and WebBrowser Component.

Here is the project output:

 

Click double to “Button Component” and add the following code into “Form1 class” as public

 

Then add the code into button1_Click method

Output:

 

All Codes: Play YouTube Video in C# Form

 

 

 

 

 

1 Comment

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.