tags:

views:

103

answers:

2

From the tools menu I have done right click>choose item>COM (tab)> and ticked adobe pdf reader. From here I simply dragged the pdf tool onto my form. That's all I've done. Now on form load it throws a bug.

"InvalidOperationException was unhandled"

hovering over the message it says the following,

An error occurred creating the form. See Exception.InnerException for details. The error is: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

Any ideas anyone? Gonna take a mastermind to work this one out seriously

+1  A: 

I think this problem might happen if you're compiling for x64 since I think the Acrobat Reader is not compatible with development for 64 bit systems I think.

You can check/change this setting in the Configuration Manager in Visual Studio.

ho1
how do i do that mate?
steve
Just open your project in Visual Studio and then create a new configuration. Here's instructions for how to do that: http://msdn.microsoft.com/en-us/library/t1hy4dhz%28VS.80%29.aspx
ho1
A: 

I can't vote up the answer above, but that is exactly what the problem is. Disabling the 64bit code compilation makes the COM work again.

Testware