views:

32

answers:

1

I need to put some activeX in my .Net WinForm. The provider had sent me a .tlb and the com .dll.

Is this enough? How do I put it on winform?

A: 

That should be sufficent. You'll need to register that dll on your machine, add it to the dev studio Toolbox (Right click on the toolbox/Choose Items) and go to the COM tab, if you can't find it in there you can browse to the specific location and select the Type Library to use.

After that you can just drag the new control to your form. A Reference to the library will be added to your project automatically.

see "Adding ActiveX Controls to Windows Forms"

Ruddy
When I choose the file I get error: "Self-registration for x.tlb failed." BTW I have ocx and not a .dll
Yaron Naveh
Try choosing the OCX instead of the TLB. I kind of figured you had an OCX as thats the normal ActiveX file extension.
Ruddy
the same error here
Yaron Naveh
Can you run regsvr32 successfully on that ocx?
Ruddy