O'Reilly logo

.NET Framework 4.5 Expert Programming Cookbook by A.P. Rajshekhar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a video player using DirectX and Windows Forms

Before Windows Presentation Framework (WPF) was introduced, if you wanted to add 3D graphics, animation, or audio/video to your application, Managed DirectX was the only option. At present, Managed DirectX has been deprecated in favor of WPF. However, if you want to embed a video in your application and do not want to use the non-trivial approach of hosting WPF, Managed DirectX is a good approach. In this recipe we will look at how to use Managed DirectX to develop a video player. So, let's get started.

Note

You will require the DirectX 9 SDK for this recipe.

How to do it...

The steps to implement the video player are as follows:

  1. Launch Visual Studio .NET 11 and create a project of type Windows ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required