I want examples about using COM Object in VB.

I created a COM object from Delphi. I can use it in my Delhpi program.
Now i want to try to use it in other languages.
Can someone sent me for example about using COM ?
                  Thank you
Who is Participating?
shyamkumarreddyConnect With a Mentor Commented:
Are u sure u generated object is COM. Because i don't much about delphi.  If ur answer(created object using delphi is COM(dll)or (exe)), then follow the
steps .

Using the references in VB , load the dll or COM objects.

Then u can use it

method 1:

dim i as .. u can see the project name fo the delphi(if u see this) and u can start using i as object.

method 2:

dim i as object

set i = createobject("rojectname")

use this method to access the objects

It is possible to access the objects created using c++, java, VC++ or another other which is supported by MIcrosoft.

Do you mean ActiveX control?
If so, add it into your project by right click on the component bar and select 'components...'. Your control should appear in the list if it's registered properly.
lekhaewAuthor Commented:
No. I don't mean ActiveX control.
Because it's not visual component.
In delphi i register it ,
then call it in my delphi program,
finally, can use it same as one non visual component.
But in VB i don't know how to call it.
                                              Thank you

lekhaewAuthor Commented:
Thank you for your answer.
But i'm not good in VB.
Can u send me a short program which calling COM object in program.
                                        Thank you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.