views:

30

answers:

1

Hi, whats the simplest way to make ocx library working in c#? (I'm using wpf project) I tried to use aximp, but when creating Ax[libname]Lib.Ax[libname] object, calling getocx() returns null.

EDIT: I should add, that this lib is for communicating with some specific driver

+1  A: 

Ok, I found solution :) After creating object, it's necessary to call method .CreateControl()

chris
If you are calling CreateControl yourself then there's no point in using aximp.exe. That creates a control you can put on a form. In which case calling CreateControl is unnecessary.
Hans Passant
For now it's only way, I tried to add this to toolbox but it was impossible for me to do
chris