I am trying to use AxVLCPlugin1/AxVLCPlugin2 in my WinForm. After some research, I've downloaded VideoLan 2.00, registered the axvlc.dll in my system, copied the plugins as well as dll's into project's output folder and added the control to my WinForm. If I try to run the code, I get:
"Unable to get the window handle for the 'AxVLCPlugin2' control.
Windowless ActiveX controls are not supported."
The environment is under Windows 7 32bit, Visual Studio 2008 and its all running on .NET 3.5.
I've read that the problem might be due to VLC library not supporting the newer Windows 7, but that shouldn't be a problem with VLC 2+ versions. I have also tried older/newer versions of VLC but still no luck.
My sample code to start the video (using 2nd plugin):
this.vlcMediaPlayer.Volume = 50;
this.vlcMediaPlayer.playlist.add(#"file:///C:\Users\Public\Videos\Sample Videos\Wildlife.wmv", "wildlife", " ");
this.vlcMediaPlayer.playlist.play();
The problem can be related to security feature of Windows called DEP (Data Execution Prevention), see link.
You can control its setting from here:
This explains the problem fairly well, see link.
It is not necessary to copy dll files to your project dir. Simply add reference to AXVLC and AxAXVLC. Search for a video instruction on Youtube.
Related
This is my last resort as I've looked all over this site for a fix, but everything I've tried doesn't work.
Issue: I want to navigate to www.espn.com via a webbrowser tool in my winform app, but I am only able to get a degraded version of espn since it tells me I'm using an unsupported browser.
What I've tried: I've tried multiple solutions where you change/add a registry key to the FEATURE_BROWSER_EMULATION but it doesn't seem to change anything.
This link is the code I've tried to fix this issue but no such luck.
Use latest version of Internet Explorer in the webbrowser control
Anyone have any ideas???
This is my current result:
it looks like you are running your windows forms project in debug mode from visual studio? Fist your need to add the BROWSER_EMULATION keys to your registry...a name value pair, where the name is the name of the exe that your project compiles to, and a value (as described here -
Use latest version of Internet Explorer in the webbrowser control) for the version of IE you wish to use (use 11).
here is a snippet from my registry
[Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"HelpPane.exe"=dword:00002710
"prevhost.exe"=dword:00001f40
"Fiddler.exe"=dword:0000270f
"XMLViewerHPSF.exe"=dword:00002af8
"sllauncher.exe"=dword:00001f40
showing the name value pairs in the registry...
Second, you then compile your webforms project to an exe with the name you used in the registry. eg myWBC.exe
Unfortunately, you cannot use the BROWSER_EMULATION key(s) when debugging from VS. You can only test your compiled project.
Regards.
I recently cleaned up my Windows 7 64-bit PC, and after it ABCpdf8 started giving me an error, when I try to export HTML to PDF.
The error is "Failed to initiate IE compatibility mode: Failed to load all required assemblies."
at WebSupergoo.ABCpdf8.Internal.IECompatibility.Activate()
at line
theID = theDoc.AddImageUrl(input.Text);
of the test application, and I have no idea why, because I did not remove any assemblies from my machine.
If I run the compiled application on another workstation with the same config (Windows 7 64-bit), it works fine. Dependency Walker images showed no difference in DLLs sets from my machine and from another.
How else can I identify the source of the problem?
It is definitely neither a missing DLL, nor the user access to the system folders, because, I checked user rights as well, they're identical on both machines.
I assume that it might be a corrupted registry entry. Is there any way to quickly check the assumption?
It has to be said that, ABCpdf comes as third-party tool within another software, so I cannot contact support directly, but through the main vendor.
I had a similar problem with different behavior on w7 and ws2008, which was solved by using the Gecko engine
doc.HtmlOptions.Engine = EngineType.Gecko;
Note that websupergoo recommends using Gecko rather than IE9 as parts of the IE API it uses have been deprecated. (item 6.29)
When you 'cleaned' your system you may have erased the license key from the registry. Try re-installing your 'other software'.
I'm stuck on a problem in VS 2010 C# .NET. I've had a project on Windows XP that includes forms, classes and a handful of my own custom components. These components are simple extensions of built-in MS components (e.g. DataGridViewEx as an extension of DataGridView). Everything has worked fine in XP. I'm trying to port this project over to VS 2010 on Windows 7 / x64. I've got the solution to compile OK on Windows 7, however in design mode, when I open a form that contains one of the custom controls, I get an error 'Could not find type XYZ.DataGridViewEx. Please make sure that the assembly that contains this type is referenced.' XYZ is the namespace I use for these controls and it is the same namespace as the forms that are using the controls. All are part of the same VS project.
When I open a form in the same project that does not contain one of these custom controls, that form opens OK in the designer, and I see the custom controls along the left side in the toolbox. However if I then try to drag one of these controls into that form, it pops up an error message box 'Failed to load toolbox item 'DataGridViewEx'. It will be removed from the toolbox.' And then it gets removed from the toolbox.
Everything was always working fine in VS solution in XP. This problem only occurs in the VS solution in Windows 7 / x64.
I don't understand why it complains about not being able to find the component, since the component is part of the same project. That's a valid thing to do, isn't it?
I've search the web/forums and found cases of the 'Could not find type' error, but it seemed to be caused by a different issue, and I haven't yet found a way to get rid of the error.
Any help/tips are much appreciated!
If your project is targeted at 64 bit, you need to build for 32 bit and choose the 32-bit solution while doing your GUI editing. This is because studio is 32-bit so cannot load 64-bit controls.
Ive run into this before, be sure that in your Form.Designer.cs code file, that each call to your custom controls are done so as absolute calls. For example:
Namespace.CustomControl control;
Rather than
CustomControl control;
Look at your references and find any that have exclamation point icons. Remove the bad references and add them back to your project.
Have you tried disabling UAC completely (running IDE as Administrator + disabling UAC just in case).
Also - always use Fusion Log for tracing assembly loads! See http://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.71).aspx for how to set it up
Did you rebuild your components from scratch?
Are the projects included?
Are they all building?
Are they all building on the same platform (x86 vs x64)?
Set the default built to x86 and that should fix it.
Clean the solution
Build the project containing the Control
Add the control to the toolbox/form
See if this works.
For anyone who with similar issue(s). I just came across this in VS 2013 (VB side) on an x86 PC. As mentioned above, I toggled from 'anyCPU' to 'x86' and the form designer opened right up. Simple, but probably wouldn't have tried it without the above post(s). For what it's worth, I toggled back to 'anyCPU', and as yet have had no recurrences...
I faced the same error, can't able to Build my application.
So searched here, Says to change the solution platform X64 or X32.
But in my case the Solution platform only shows Any CPU and configuration manager option only
But i simply change the solution configuration.
Debug => Release
then
Release => Debug
Finally clean and rebuilt the solution. Its works for me!!:)
While the top answer from #richard-whitehead is correct that the 64bit editor cannot load the 32bit controls which is why you're seeing the error, there is another way to have Visual Studio edit 32bit GUI controls in a 64bit GUI project as described here:
https://stackoverflow.com/a/26539992/2280961
So I've been hunting around for a good way to utilize a webcam from within a C# application. I tried a p/invoke dll which turned out to be inexplicably and irreproduceably buggy. After tinkering with a few others that either weren't suitable or were utterly archaic, I was referred to this:
http://jakemdrew.wordpress.com/2012/01/10/controlling-your-web-camera-using-c/#comment-15
It's the Touchless Vision code with a C# wrapper updated to work in VS 2010. It works wonderfully...as long as VS is installed on the machine. Download and run that release build on anything that doesn't and it will throw an error claiming that it can't find WebCamLib.dll or one of its dependencies. The fun part is that I've already integrated this into the project. It works great, but I'd like to be able to distribute this without additional installers or requiring VS 2010 to be installed on everything. What gives here?
I am using Aforge.net libraries(Aforge.net) without any problems on multiple computers even without VS installed.
But are you sure WebCamLib.dll is copied in the app directory? Aforge.Net also needs some dlls copied to computers, but if you have set Copy Local property to true, it should be inside the Debug/Release directory, also it will be in the directory when you release your app using Publish.
Sample:
Add Aforge.Controls.dll to your toolbox items
In designer put VideoSourcePlayer control in your form
Add private FilterInfoCollection videoDevices; in form class
Add into form initializer (or in function that you want to start your camera)
videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
foreach (FilterInfo fi in videoDevices)
{
this.videoSourcePlayer1.VideoSource = new VideoCaptureDevice(MonikerString);
this.videoSourcePlayer1.Start();
break;
}
Now you should be getting image from webcam in VideoSourcePlayer control. You can use NewFrame event of VideoSourcePlayer control to get access to each frame camera is sending and to save or change image.
well some time has passed since the question but, just for the sake of solving it I´ll say this:
Supposing that you have the references to the dlls and the files where they should be the only thing left to do is check the dll dependencies, in this case
the programmer of the touchless and webcamlib dlls didn´t care much for "versioning" so, find the c++ vs2012 redistribution for x64 and x86 and install them, then run your App and carry on with your Project.
For my work I need to create a Autorun application for a CD for our client. The problem is all I'm a C# programmer by trade and .NET does not make for the best autoruns since not all computers will have .NET installed on them.
What is a good solution that will work on Win98-Vista computers?
The answer to this question is really one of preference. Technically, anything can be instructed to open as an autorun. The autorun.inf file is simply an instruction file that Windows knows how to read in order to determine what it should do when a CD is inserted. That could be an application (written in any language you choose), a powerpoint presentation, opening a link to a website, etc. As long as you follow the rules of the autorun.inf file:
http://autorun.moonvalley.com/autoruninf.htm
There are many small autorun-utils (some free) that are configurable. I would go for one of those.
http://www.ezau.com/latest/articles/083.shtml
You need two things:
Follow this steps (http://support.microsoft.com/kb/324733 OR http://support.microsoft.com/kb/888469)
When your application is ready (with bootstrapper), you'll have to create a autorun.inf file on CD root path. Search 'autorun.inf create' on your favorite Search Engine.
It is possible using Mono's bundling feature:
"The resulting executable is self contained and does not need the Mono runtime installed to run."
Mono is an Open Source .Net clone and should be able to run most .Net applications. See "Bundles" section here: http://www.mono-project.com/Guide:Running_Mono_Applications
You could use .hta file on CD to launch as splash page, and from there detect if .NET is installed (using COM from HTA file) and then run your custom executable.
.hta files are what Microsoft SQL Server (and most of their others) installation cd uses from memory, easy to make them look very professional (its just html in the background basically)
You can include the runtime with the CD, but you'll have to install it before running your app. You might look into just popping open an html file from the CD.
Otherwise, you can look at writing a small native program that can prompt to install the runtime if it's not there, or run your .NET app if it is.
Try Delphi; it's by far the best way to create native win32 application nowadays.
It creates slick stand-alone .exe files with rich GUI's that don't need any runtime libraries or other annoying dependencies. Works on any windows machine.
There was a program from Macrovision called "Demoshield" that worked well back in the day. I'm not sure if its available anymore, but it was an alright program for creating the auto-run programs.