Hello,

Does anyone know how to pass a prameter to vb.net program that will run behind an exist vb 6 program.

I have been given an instruction to write the new functionality in vb.net and integrate it with vb 6.

Many Thanks

S

Recommended Answers

All 3 Replies

you can call the .net exe from Vb at runtime ans pass the parameter.

But how do I do that?
I know how to call the .net exe but how do I pass the parameter.
Should i create a little ini file or something like that?

What kind of VB.NET exe and what kind of parameters you have?

You could write parameters to a some file and pass the file's name to exe with commandline. If you have only few parameters, put them to exe's commandline.

And here's how to deal with cmd-line in VB.NET:

For i = 0 To My.Application.CommandLineArgs.Count - 1
  Debug.Write(My.Application.CommandLineArgs.Item(i))
Next i
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.