how to call ActiveX from vb.net

  • Thread starter Thread starter lei_xu
  • Start date Start date
L

lei_xu

Can anyone point me articles/links
on sthe steps to call ActiveX from VB.net?

TIA

lei xu
(e-mail address removed)
 
Hello lei,
You add a reference to your project that points to the ActiveX obj in
question. (RH Click the reference folder in solution explorer. Choose
the COM tab in the dialog box that comes up and browse to the dll / ocx
that you want.
Vb.net will then provide a reference that you can declare in your code.
eg. browse to say, Winnt/system32/Widget.ocx which has say, a Public
getcolour function that returns the Widgets colour as a string.
Once you have the reference you can:
Dim myWidget as new Widget
Dim strColour as string
strColour = myWidget.getcolour
HTH
Bob
 
Back
Top