Is it possible to Embed and Run a VB6 Exe in .NET Windows Application?
-
Hi! Is it possible to Embed and Run a VB6 Exe in .NET Windows Application If Yes, then how to how to communicate with that Exe (set or get variables), call functions, etc. If No, then please tell me any other way to communicate that exe Actually I am trying to develop an application in .NET (C# Or VB .NET) and this application does not support controls used in VB6 Exe The VB6 Exe connects to the database, How do i send the connection string to that exe from .NET application Is there any way other than "CommandLine arguments"? Thank you Gulfraz Khan
-
Hi! Is it possible to Embed and Run a VB6 Exe in .NET Windows Application If Yes, then how to how to communicate with that Exe (set or get variables), call functions, etc. If No, then please tell me any other way to communicate that exe Actually I am trying to develop an application in .NET (C# Or VB .NET) and this application does not support controls used in VB6 Exe The VB6 Exe connects to the database, How do i send the connection string to that exe from .NET application Is there any way other than "CommandLine arguments"? Thank you Gulfraz Khan
There is no way to embed a VB6 app inside a .NET app and expect it to run. It must be a seperate file. Communication is going to be a huge PITA. You cannot call its functions or anything else, unless the VB6 app exports them through COM. A normal VB6 app cannot do this unless it's written as an ActiveX server. As for the controls that work in VB6 and won't work in C#, I doubt it. I haven't come acrossed a control that didn't work in the .NET world, but did in VB6. I have, however, come acrossed some badly written controls that I didn't even bother with in the conversion to .NET. I either got an updated control or just wrote an equivalent control myself and replaced it. Your best solution is to scrap the VB6 app entirely and rewrite in C#. Why have 2 different runtimes loaded, VB6 Runtime and the .NET Framework, for your app to work? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome