Calling VB.NET form from VB 6 EXE

  • Thread starter Thread starter Uri Dimant
  • Start date Start date
U

Uri Dimant

Hello
I activate my vb6 application from vb.net .Now user want to be able to call
vb.net form from vb6 exe
How do I call vb.net from from vb6 source?
Do I hit some perfomances issue?
Can you show me an example of code ?
Thanks
Shell("c\folder\vb.exe", vbMaximizedFocus)
 
* "Uri Dimant said:
I activate my vb6 application from vb.net .Now user want to be able to call
vb.net form from vb6 exe
How do I call vb.net from from vb6 source?
Do I hit some perfomances issue?
Can you show me an example of code ?
Thanks
Shell("c\folder\vb.exe", vbMaximizedFocus)

Do you want to shell the VB6 executable? You can still use 'Shell', or
'System.Diagnostics.Process.Start' to do that.
 
Hi,
Thanks
What is the code in my VB6 code I have to add in order to call let me say
form1 in VB.NET
 
Uri Dimant said:
What is the code in my VB6 code I have to add in order to call let me
say form1 in VB.NET

You can not call a Form. You can call an executable. You may pass arguments
in the command line to the exe. In the vb.net Exe, you get the command line
using the Command function (Microsoft.VisualBasic.Interaction.Command) or
System.Environment.CommandLine or by adding "byval args() as string" to sub
main.
 
He's using vb6, he wants to try and use vb6 and then somehow use the .net
namespaces within vb6 code.
 
My newsreader (I don't know why) didn't show your post)...

We know, do you copy this message also from Google.

:-))

Cor
 
You can call out from unmanaged code object (VB6) to objects created in .Net
using COM Interop. See the .Net documentation for all the gory details.
There's also a lot posted on the web on how to do this.

This means, of course, that you wrap the .Net functionality in a dll created
in .Net; there's no way to call directly from VB6 into the .Net libraries.

Prester John
 
Whoever I responded to then tried to tell him how to get command line args
from within dot net....which was pointless because hes inside VB6....hence
my comment.
 
J said:
Whoever I responded to then tried to tell him how to get command line
args from within dot net....which was pointless because hes inside
VB6....hence my comment.

I don't see a previous message from "J" in this thread.
 
Back
Top