I have tried to play a Camtasia video inside a web browser control but it comes up with javascript needs to be enabled error on page. How can I work it or find a work around that? I'd like to have a listbox that contains the movies and they would play in the browser. I have a membership site that I'd like to have a player that authenticates the user before playing them but first things first, what is the best way to accomplish playing Camtasia videos inside a form?
One question, how are Camtasia videos different from other videos?
Why can't you just add a Windows Media Player control to your form and play it there?
Well outside of the html page their played on it depends on how they're produced. It could be a flv or swf file or even mp4. So it depends on how it's been rendered.
Okay.
So;
1. If you want to show your video on a HTML page, just simply navigate the webbrowser to the HTML page and then let the page to the rest. As for what code the HTML page should have, I can't help you without seeing the Camtasia Video code but you can try <object> or the "unofficial" <embed> tag.
2. If you want to play the video directly through your application without webbrowser, you would need to check which format the video is. Swf needs flash player. As for the other formats, you could use VLC Control (you get this when installing VLC).
System.InvalidOperationException was unhandled
Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
Source="MyProject"
StackTrace:
at MyProject.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
at MyProject.My.MyProject.MyForms.get_Form1()
at MyProject.My.MyApplication.OnCreateMainForm() in C:\Users\Anonymous\AppData\Local\Temporary Projects\MyProject\My Project\Application.Designer.vb:line 35
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at MyProject.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Runtime.InteropServices.COMException
Message="Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
Source="System.Windows.Forms"
ErrorCode=-2147221164
StackTrace:
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at MyProject.Form1.InitializeComponent() in C:\Users\Anonymous\AppData\Local\Temporary Projects\MyProject\Form1.Designer.vb:line 59
at MyProject.Form1..ctor()
InnerException:
ok, I think some corrupt code has destroyed the Form, that happens sometimes when using 3rd party plugins.
You can start a new project or delete the form itself which contains the VLC plugin and redo it, there must be something wrong in Form1.Desinger.vb
Hmm.. I don't think this issue is related with VLC... it might be some hardware change affecting the system... As the long error says, there are missing classes ;S
Try on another PC and I'm sure it'll work ^.^