Calling VB.NET form from VB 6 EXE

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)
 
H

Herfried K. Wagner [MVP]

* "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.
 
U

Uri Dimant

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
 
A

Armin Zingler

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.
 
M

mrpolitics

He's using vb6, he wants to try and use vb6 and then somehow use the .net
namespaces within vb6 code.
 
C

Cor

My newsreader (I don't know why) didn't show your post)...

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

:))

Cor
 
P

PresterJohn

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
 
J

J

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.
 
A

Armin Zingler

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.
 

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