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)
 
Can anyone point me articles/links
on sthe steps to call ActiveX from VB.net?

TIA

lei xu
(e-mail address removed)

After it's registered, make a reference to it and use it like you did in
VB6. Works for me anyhew :)

HTH
Sueffel
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top