By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,449 Members | 1,555 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,449 IT Pros & Developers. It's quick & easy.

Using OCX in .NET

P: n/a
Hi misters,

I try use an OCX in my Winforms application with VS 2005.

The OCX is a PDF Viewer (XPdfViewer)

I have several issues about it:

1. I add reference to COM, and VS generate Interop.XpdfViewer.dll

When I call to method of COM, I get this error:

ErrorCode -2147467259

Exception Details: System.Runtime.InteropServices.COMException: Error
HRESULT E_FAIL has been returned from a call to a COM component

One question, how I get a detail description of a COMException ?? Any help
please.
2. I Choose Items in Toolbox and select COM (OCX). The VStudio generate
AxInterop.XpdfViewer.dll.

(which is the difference AxInterop.XpdfViewer.dll and
Interop.XpdfViewer.dll???)

For a Component Control, in design, the control XPdfViewer NOT appears in
toolbox, why ???

For Forms, in design, the control XPdfViewer appears in toolbox
For UserControl, in design, the control XPdfViewer appears in toolbox
Any suggestion about it ? Thanks in advance.
--
http://www.alhambra-eidos.es/web2005/index.html
www.kiquenet.net
http://www.setbb.com/putainformatica...opic.php?p=843
www.trabajobasura.com/solusoft

Jul 10 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Its been a few years since I used COM based controls but I think the
difference is the Interop generated file is just a management wrapper around
the class for using it as a code library. the AxInterop is a wrapper around
it as an ActiveX control for using it on a form.
The reason it wont appear for a component is possibly because its an ActiveX
control as has a UI which so it can only be added to a Form/Usercontrol that
will use it for a UI control.
Someone with more recent experience of this than me might be able to confirm
this though. Its literally been 4 years or so since I used an ActiveX form
control in .NET

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Alhambra Eidos Kiquenet" wrote:
Hi misters,

I try use an OCX in my Winforms application with VS 2005.

The OCX is a PDF Viewer (XPdfViewer)

I have several issues about it:

1. I add reference to COM, and VS generate Interop.XpdfViewer.dll

When I call to method of COM, I get this error:

ErrorCode -2147467259

Exception Details: System.Runtime.InteropServices.COMException: Error
HRESULT E_FAIL has been returned from a call to a COM component

One question, how I get a detail description of a COMException ?? Any help
please.
2. I Choose Items in Toolbox and select COM (OCX). The VStudio generate
AxInterop.XpdfViewer.dll.

(which is the difference AxInterop.XpdfViewer.dll and
Interop.XpdfViewer.dll???)

For a Component Control, in design, the control XPdfViewer NOT appears in
toolbox, why ???

For Forms, in design, the control XPdfViewer appears in toolbox
For UserControl, in design, the control XPdfViewer appears in toolbox
Any suggestion about it ? Thanks in advance.
--
http://www.alhambra-eidos.es/web2005/index.html
www.kiquenet.net
http://www.setbb.com/putainformatica...opic.php?p=843
www.trabajobasura.com/solusoft
Jul 10 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.