Reputation: 3075
How can I call a dot net exe from VB6 and pass some information to it? If possible, can I do the same thing, calling VB6 exe from dot net application?
Upvotes: 0
Views: 2659
Reputation: 121881
If you absolutely have to use VB6, your best bet is to call a VB6 function from C# is to export your VB6 functionality with COM, then use Interop in C# to access it:
Calling a VB6 method from a .NET DLL
If you just want to invoke an .exe, you can easily do that with ShellExec (from VB) or Process.Start (from C#).
Upvotes: 4
Reputation: 10580
Use the Process class.
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "MyApplication.exe";
startInfo.Arguments = "The arguments";
Process.Start(startInfo);
Upvotes: 2