call vb6 exe from .net

T

Tommy Christian

Hi.
I wondering is there any technicue that I could use to call vb6 exe from
my .net dll project programmed with c#?
I know that via com interoperability I can use vb6 .dll components but know
I have
an exe running on machine, where I need some services. How this should be
handled?

Regards,
Tommi
 
E

Etienne

Look at System.Diagnostics.Process.Start method, you can start any
application as if you were using Start|Run windows command. You can run any
application, and you can even open documents, web pages or a email editor.

Etienne Charland
 
P

Paul Clement

¤ Hi.
¤ I wondering is there any technicue that I could use to call vb6 exe from
¤ my .net dll project programmed with c#?
¤ I know that via com interoperability I can use vb6 .dll components but know
¤ I have
¤ an exe running on machine, where I need some services. How this should be
¤ handled?

Depends upon whether you're using a stand alone or ActiveX EXE. You can use the method described by
Etienne if it's a stand alone EXE but there is no capability to control the app from your .NET app.
An ActiveX EXE can be controlled via COM automation and interop, just as an ActiveX DLL.


Paul
~~~~
Microsoft MVP (Visual Basic)
 
T

Tommy Christian

Thanks for answers.
I was able to use System.Diagnostics.Process to control exe start
and shut down, but then we desided to move another solution.

We made one public class into the vb6 exe and built it as ActiveX.
After that I just add this exe as reference into my .NET project and it
can be used as any COM component, of course trough this public class
which we made to the project.
 

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