שתף באמצעות


Failed to import ActiveX control

Question

Wednesday, June 7, 2006 10:55 PM

I am using VB2005 express and VC#2005 express. With my old friend VS2003, whenever i needed to add flash to my WInforms, all i needed to do was to add the control as a com component and drag it on the stage from the toolbar. Now, when i did the same in new express version, althogh it is added in the toolbars and the references list, but still, whenever i try to drag a shockwave flash instance on my win form, i get the error:

Failed to import ActiveX control, please ensure it is properly registered.

does some one have any idea how to add flash comntrol as we used to do in earlier versions? Please reply this ASAP.

Thanks and regards.
Syed Mazhar Hasan

All replies (42)

Thursday, June 8, 2006 12:56 AM ✅Answered

Try registering the control with regsvr32


Wednesday, July 19, 2006 12:33 PM ✅Answered | 10 votes

Ok here is my Solution:

After you add it to ToolBox, Drag and Drop it in your Windows Form... The error will raise.. click Ok..

Rebuil Your Project (The DLL will be copied)

Re-Drag and Drop the component and now, it'll work.

a+


Friday, June 30, 2006 11:42 AM

Hello, I also have the same problem in visual studio 2005 with flash control and other 3rd party components. Obviously VS 2005 has serious bug regarding the import of ActiveX components. Is there a workaround? Please help, and avoid obvious answers like the "use regsvr32". Its frustrating because things worked OK in VS2003 and now are broken.

Thanks :)

paketman


Friday, June 30, 2006 12:58 PM

Try downloading the latest flash player.

Additionally, you do not necessarily have the rights to distribute the flash activeX control, unless you have a license. Even so, to install the flash control, you will use the adobe installer to do so.

It's also possible the VS2005 i honoring any development licenses that may be required for the control (there's an extensive licensing form and e-mail registration required).


Friday, June 30, 2006 1:55 PM | 8 votes

regsvr32 does not solve the issue (at least for my case...). Please try the following workaround:

Drop the control inside your form and observe the error message happenig (ugh!)

Then go to AppFolder\Obj\Debug and delete the interop file that was created or even delete the entire contents (will be recreated). Then drop the control again. It should work now :)

Regards

paketman


Tuesday, July 4, 2006 1:22 PM

as you guys I am presenting the same trouble. Besides that I am not a windows user, but I have to work right now in a windows machine.  For that I need more of your patience and help, I search for this AppFolder\Obj\Debug but I couldnt find neither the path nor the Debug folder. Where actually should be it?

Hope you can help me with this and make run this component  soon!

Thanks in advance.

cais


Tuesday, July 4, 2006 5:54 PM

On a typical WIndows XP or WIn Server 2003 Installation, you can find Flash.ocx file under this path:

c:\WINDOWS\system32\Macromed\Flash\

For Windows 2000, this would be:

c:\WINNT\system32\Macromed\Flash\

 

In both cases, C:\ is the drive where windows is installed


Wednesday, July 5, 2006 7:00 AM

ok, thank you Syed for your explanation. I found the path and the file you suggested me. But if I take away the Flash.ocx, the error message is even worse.

How can I activate the Schokwave Flash Object into VB2005? that is THE question. I am using Flash 8 with licence.

The solution of Packetman sounded simple and effective, but I never found that path to implemented :-(  Did it work for you Syed?  I hope you have it working already :-)

and can you help me to make work my connection please!!!

Thanks in advance.!

cais


Thursday, July 20, 2006 12:16 PM

After installing the new Flash Player 9 (http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash) using axShockwaveFlash (C:\WINDOWS\system32\Macromed\Flash\Flash9.ocx)  worked fine with me!
I am working with VS 2005 Pro.

 

Regards,
Moritz Pfennig


Friday, August 4, 2006 4:05 PM

heh, that worked like a charm.. interesting none the less.. Thanks Grattier!


OK Adobe, where is your move to move this from a COM, to a .Net Assembly..?


Saturday, August 5, 2006 6:16 PM

I have alwats the same problem , i 've tried to install the last flash player, he don't work on vs2005. error dispaly saying that activex can't install propertly.

Help

 


Saturday, August 5, 2006 6:18 PM

 forstf wrote:

I have always the same problem , i 've tried to install the last flash player, he don't work on vs2005. error dispaly saying that activex can't install propertly.

Help

 


Monday, August 7, 2006 5:45 AM

I can't thankyou enough.. 


Monday, August 7, 2006 5:10 PM

Well I found that it is the wrapper for the activex control that .Net builds when you add the control.

Seems that the version of wrapper built in .Net 2003 works fine although 2005 has an issue.

The work around I found is to replace the auto generated DLL wrappers, with the versions from 2003.

The file names are : AxInterop.ShockwaveFlashObjects.dll and Interop.ShockwaveFlashObjects.dll

During Design mode they are located in the obj/Debug location.

If you cannot obtain a copy of these files, let me know and I will email them to ya.

I believe this has to do something with cross threads.. not sure though..

Pain in a$$ if you ask me..


Monday, August 7, 2006 5:11 PM

Well I found that it is the wrapper for the activex control that .Net builds when you add the control.

Seems that the version of wrapper built in .Net 2003 works fine although 2005 has an issue.

The work around I found is to replace the auto generated DLL wrappers, with the versions from 2003.

The file names are : AxInterop.ShockwaveFlashObjects.dll and Interop.ShockwaveFlashObjects.dll

During Design mode they are located in the obj/Debug location.

If you cannot obtain a copy of these files, let me know and I will email them to ya.

I believe this has to do something with cross threads.. not sure though..

Pain in a$$ if you ask me..


Monday, August 7, 2006 5:13 PM

Well I found that it is the wrapper for the activex control that .Net builds when you add the control.

Seems that the version of wrapper built in .Net 2003 works fine although 2005 has an issue.

The work around I found is to replace the auto generated DLL wrappers, with the versions from 2003.

The file names are : AxInterop.ShockwaveFlashObjects.dll and Interop.ShockwaveFlashObjects.dll

During Design mode they are located in the obj/Debug location.

If you cannot obtain a copy of these files, let me know and I will email them to ya.

I believe this has to do something with cross threads.. not sure though..

Pain in a** if you ask me..


Saturday, August 19, 2006 6:22 AM

Well that's good.

I did face a problem and your workaround helped, I have another problem, I am suppose to deploy this windows based exe to other plenty of systems, I don't think I will be having the development environemnt on that machines, in that case the form where the flash is running will not work... what best can be done taking this scenario.

Would be greateful, if you can put some light on this.

Thanks in advance

 


Monday, August 21, 2006 8:49 PM

If you mean that you can't build an install along with your compiled app, then you might be in trouble.

Although if you can build a .Net msi or install package, just simply copy the 2 dll's along with the Flash activex control and all should be fine. You can just deploy them to the same directory as the exe and then build a shortcut on the user's desktop. Or put them in a system directory and register them on the user's machine.

The biggest problems I always face are them not having the correct version of MDAC or the .Net framework..

I believe if you build the setup through .net with your current project, it will automatically include the referenced files.

Good luck!


Friday, October 20, 2006 9:23 PM

regsvr32 Flash9.ocx

Works


Thursday, November 30, 2006 5:23 PM

 Grattier wrote:

Ok here is my Solution:

After you add it to ToolBox, Drag and Drop it in your Windows Form... The error will raise.. click Ok..

Rebuil Your Project (The DLL will be copied)

Re-Drag and Drop the component and now, it'll work.

a+

It works for me !!!

Using:
Visual Basic 2005 Express Edition
Windows XP SP2
Flash8.ocx (v 22)

Thanks


Monday, December 4, 2006 4:38 PM

Paketman,

Thank you for posting this workaround; it worked beautifully for me. I was getting this same error when attempting to add a Microsoft Office Document Imaging View Control to a form in VS2005.

 


Tuesday, January 2, 2007 6:03 PM

The only thing that works is the post from Grattier
Alternatively you have to get the Interop*.dlls from another machine (eg. try using VS2003 and use those).


Tuesday, January 30, 2007 9:13 PM

I have flash9b.ocx installed on system and am using C# Express 2005 on Win2K, tried everything listed here, including re-installing latest Flash Player, nothing worked

then, tried unregister flash9b.ocx and registered again,  then dragged flash thing on the form for the 1001 time, it worked! don't know why


Tuesday, April 17, 2007 6:36 PM

x-l-ent work around paketman. I've been trying to fix this all morning. I'm using C#, not VB but apparently it's the same workaround.


Friday, April 27, 2007 1:40 PM

Please .. i need u to help me with this.. i downloaded this component from adobe flash & then from choose items i browsed to the path of it. I found that flash9c.ocx exists & checked when i click ok.. so that it can be added in the toolbox, i find nothing added & when i add flash9b.ocx tells me "the operation could not be completed. unspecified error".. i really need ur help.. if u can plz.

i'm using v.s2005 c#.. win xp professional ..


Friday, April 27, 2007 1:48 PM

Hi, i need help in adding this component in v.s2005 c# bec when i added flash9c.ocx i found it already existing & checked then i clicked ok but i never found it in the toolbox .. when i added flash9b.ocx i had this error "the operation could not be completed. Unspecified error".. i'm using v.s 2005 c# in win xp professional..


Sunday, May 27, 2007 12:37 PM

- Shockwave Flash Object is not found in COM components

- There is FlDbg9c.ocx in my Macromed/Flash, not Flash9c.ocx

- I rebuild my pj and drag and drop it but it's still not work

Anyone can help me pls?


Saturday, June 16, 2007 12:46 PM

**
Thanks Grattier, this worked for me as well**


Monday, September 3, 2007 6:23 AM

Grattier.. You are great... This solution is working... Thanks man..

 


Monday, November 26, 2007 7:01 AM

 

To fix the "Failed to import Active X" error, go to the project folder then \Obj\Debug and delete any files that contain the phrase 'interop' in the filename. You'll quickly see new files appear, if VB is running. Now drag the Shockwave Flash Object to the form.

This worked fine with me.


Monday, November 26, 2007 2:23 PM

 paketman wrote:

regsvr32 does not solve the issue (at least for my case...). Please try the following workaround:

Drop the control inside your form and observe the error message happenig (ugh!)

Then go to AppFolder\Obj\Debug and delete the interop file that was created or even delete the entire contents (will be recreated). Then drop the control again. It should work now

Regards

paketman

Thanks! I had the same problem with Visual C# 2005 EE when using MODI from office 2003.


Monday, January 14, 2008 3:19 PM

**Grattier,

Your solution is working fine. Thanks a lot
**


Monday, May 19, 2008 5:55 AM

Hi Guys, I also had this problem but right now, I solve it by above method

 

When your Starting your project Save it after that you can do what ever you want 


Tuesday, May 20, 2008 11:45 AM

regsvr32 worked for me. Thanks Ken...


Monday, May 26, 2008 5:31 PM

None of these solutions are working for me.

 

In VS2005 I'm stuck. I also have VB6 installed, and there the OCX imports fine. In VS2005 I get the above error message, but sometimes I also get a ResolveComReference error.

 

1) When I go to the obj directories the interop files aren't even generated (so the delete then re-add solution doesn't work for me).

2) running tlbimp on the ocx gives me a TI0000.exe error - Error loading library

3) running aximp on the ocx generates a TYPE_E_CANTLOADLIBRARY error.

 

This ocx has loaded fine in VS2005 before I reformatted my PC, and loads fine on other machines. VS2005 is local, but our code is on a server share drive, so my first thought was some kind of security settings was messed up, but I moved everything to a local drive and still no dice.

 

I've also made sure that I have the latest VS2005 service packs, and XP is compeletly up-to-date.

 

I've been working on this for almost a week with no progress, and I'm getting pretty desperate. Anyone have any other ideas?


Saturday, May 31, 2008 8:21 PM

if you are looking to create Image Upload Active X controls, please see here

http://www.developercoffeeshop.com


http://www.vainternet.com


Friday, November 13, 2009 11:54 AM

Hello
It worked like magic! i was struggling to just put the component on the form.

But i was stopped by the following Error messages before I could proceed

Error 2 Failed to create the wrapper assembly for type library "AxMODI". Exception of type 'Microsoft.Build.Tasks.ComReferenceResolutionException' was thrown. C:\Documents and Settings\V.L.PATIL\Local Settings\Application Data\Temporary Projects\CROinterface\AxMODI CROinterface

Warning 1 Could not resolve dependent COM reference "stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". CROinterface
Error 3 Type 'AxMODI.AxMiDocView' is not defined. C:\Documents and Settings\V.L.PATIL\Local Settings\Application Data\Temporary Projects\CROinterface\Form1.Designer.vb 23 31 CROinterface
(CROinterface is name of my project)

Will you be able to tell me how to resolve this issue. I am new to this kind of projects.
It will be a great help

Best Regards'
VLPatil
vlpkk@yahoo.com


Tuesday, July 6, 2010 12:40 PM

I signed up for this site just to say thankyou to this guy;

Thanks!

Also, how hard is it to find decent information on the internet these days? This is the first straight answer with immediate results that I've read in months!


Saturday, October 1, 2011 3:03 AM

How do you register with the regsvr32?


Friday, March 30, 2012 3:12 AM

Here is what happened to me. I pasted in some code that referenced a custom control. I added the reference, but I was stuck as before. VS would not allow me to build. None of the above instructions worked for me

I finally removed all references to the new control, rebuilt, the new control then showed up in the toolbox. I then uncommented these references, and i was off to the races.


Wednesday, May 30, 2012 4:46 PM

I used ni measurement studio 2010SP1 and visual basic2010 Express..But why i cannot use the meter in the measurement studio.I try to select meter in .NET Framework Components but failed..What should I do?


Saturday, February 14, 2015 3:53 PM

IM not getting your point