I created an app to view and tag all of my home movie files. To play back the video I embedded Windows Media Player in the form. It also allows me to add comments to videos and search based on the comments. While it is functional, I would prefer to embed VLC Media Player because of the added functionality and its support for more media formats. Based on the videos I've seen on youtube the procedure seemed to be a simple one, however, I keep getting hung at the second step. I've added the vlc component to my toolbox but whenever I try to drag the control to my form I get

---------------------------
Microsoft Visual Studio
---------------------------
Failed to create component 'AxHost'.  The error message follows:

 'System.Runtime.InteropServices.COMException (0x8002801D): Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))

   at System.Windows.Forms.Design.DocumentDesigner.AxToolboxItem.CreateComponentsCore(IDesignerHost host)

   at System.Drawing.Design.ToolboxItem.CreateComponentsCore(IDesignerHost host, IDictionary defaultValues)

   at System.Drawing.Design.ToolboxItem.CreateComponents(IDesignerHost host, IDictionary defaultValues)

   at System.Windows.Forms.Design.OleDragDropHandler.CreateTool(ToolboxItem tool, Control parent, Int32 x, Int32 y, Int32 width, Int32 height, Boolean hasLocation, Boolean hasSize, ToolboxSnapDragDropEventArgs e)'
---------------------------
OK   
---------------------------

I've seen several posts from Microsoft on this problem but none have helped. Has anyone else found a solution to this? Has anyone embedded vlc in a vb.net app?

VideoLan DotNet works perfectly for me.

 Dim cnt As New Vlc.DotNet.Forms.VlcControl
 cnt.Media = New Vlc.DotNet.Core.Medias.PathMedia("x:\file.mp4")
 cnt.Dock = DockStyle.Fill
 Me.Controls.Add(cnt)

How do you add the downloaded package to the project so that

Dim cnt As New Vlc.DotNet.Forms.VlcControl

actually works? As is typical, the package is provided with essentially no documentation. The site says New documentation is now in progress, should be up soon. That was in April of 2012. Where am I supposed to put the downloaded dll files? Do I have to register them? Too many unknowns here. They don't even bother to list the properties and methods that are available. It seems to consist of "Here's a black box. You figure it out."

Do I have to register them?

No. They are not activex (COM components).

Where am I supposed to put the downloaded dll files

In order to use VLC DotNet library in WinForm app, you have to add references of Vlc.DotNet.Core.Dll, Vlc.DotNet.Core.Interops.Dll and Vlc.DotNet.Forms.Dll files to the project.

That did it, although I had to create the control at runtime rather than by dropping it on the form. I was able to playback a video. Are you aware of any documentation on how to add controls such as position, start/stop/pause, volume, etc?

I did a little more playing and added a progress bar. While playing a few test videos I noticed that the display got scrambled periodically (and always in the same places). The problems did not occur in either Windows Media Player or the full vlc player so I think I will just abandon the vlc implementation until it is officially supported by the videolan.org. Thanks for the assistance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.