Activex application

G

Guest

I have an activex application developed in VB6 as an EXE file with some user
interface and some objects I can access from other applications.
How can I do that inVB.net? Activex application doesn't exist when I try to
create a new application.
 
P

Phil G.

Apologies if I am stating the obvious!!!

Have you tried adding a reference to your exe from the 'references folder'
within the properties panel....>Add Reference >Browse.

Rgds
 
M

m.posseth

this is not what he wants , what you are suggesting is using a VB6 activex
executable in VB.Net

what he wants is making a executable with equivalant VB6 COM \ OLE
functionality

well the answer is create your classes and methods public and they can be
accessed externally by other .Net applications ( this is possible in every
..Net application that is why it isn`t specified in the project window ,,,
this technique is even availlable in ASP.Net ,,,,,, )

If you want you program also be accessible by non .Net apps ,,, then you can
write a public class and expose it to COM ,,,


maybe this would be nice to write an article about ,,,,,, if i just could
find the time ;-)


Michel Posseth [MCP]
 
D

Dragon

A little correction:
You can't add a reference to .exe assembly from devenv, so you have to
either rename it to .dll or compile with vbc.

Roman
 
P

Phil G.

Can you explain why then, when you select browse, the file extensions shown
are *.dll *.tlb *.ocx *.olb and *.exe ?

Cheers, Phil
 
M

m.posseth

Can you explain why then, when you select browse, the file extensions
shown are *.dll *.tlb *.ocx *.olb and *.exe ?

Well Phil ,, with .Net references Dragon is right , because as soon as you
click on the executable an error is thrown that you cannot add a refernce to
a file with this extension

however if it is a COM component this error should not be raised ( it is
possible to make a .Net COM Component )


so the reasson that the extensions *.dll *.tlb *.ocx *.olb and *.exe are
shown is that the reference might be a Com capable Assembly


regards

Michel Posseth [MCP]
 
P

Phil G.

Thanks for explaining this. I had looked through both the .net and com and
noticed, as you rightly state, that all of the .net assemblies are .dll,
whereas there are some com assemblies such as adobe distiller that are .exe.

Cheers :)

Phil

m.posseth said:
Can you explain why then, when you select browse, the file extensions
shown are *.dll *.tlb *.ocx *.olb and *.exe ?

Well Phil ,, with .Net references Dragon is right , because as soon as
you click on the executable an error is thrown that you cannot add a
refernce to a file with this extension

however if it is a COM component this error should not be raised ( it is
possible to make a .Net COM Component )


so the reasson that the extensions *.dll *.tlb *.ocx *.olb and *.exe are
shown is that the reference might be a Com capable Assembly


regards

Michel Posseth [MCP]

Phil G. said:
Can you explain why then, when you select browse, the file extensions
shown are *.dll *.tlb *.ocx *.olb and *.exe ?

Cheers, Phil
 
G

Guest

The enviroment from I need to acces the object is VBA-Word, so... Can be
accessed from there an standar .net public object or I need to create a COM
application?

"Phil G." escribió:
Thanks for explaining this. I had looked through both the .net and com and
noticed, as you rightly state, that all of the .net assemblies are .dll,
whereas there are some com assemblies such as adobe distiller that are .exe.

Cheers :)

Phil

m.posseth said:
Can you explain why then, when you select browse, the file extensions
shown are *.dll *.tlb *.ocx *.olb and *.exe ?

Well Phil ,, with .Net references Dragon is right , because as soon as
you click on the executable an error is thrown that you cannot add a
refernce to a file with this extension

however if it is a COM component this error should not be raised ( it is
possible to make a .Net COM Component )


so the reasson that the extensions *.dll *.tlb *.ocx *.olb and *.exe are
shown is that the reference might be a Com capable Assembly


regards

Michel Posseth [MCP]

Phil G. said:
Can you explain why then, when you select browse, the file extensions
shown are *.dll *.tlb *.ocx *.olb and *.exe ?

Cheers, Phil


A little correction:
You can't add a reference to .exe assembly from devenv, so you have to
either rename it to .dll or compile with vbc.

Roman
 

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

Top