call vb6 exe from .net

  • Thread starter Thread starter Tommy Christian
  • Start date Start date
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
 
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
 
¤ 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)
 
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.
 
Back
Top