Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Member Login

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Eng-Tips
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...This site is like first coffee in the winter morning..."

Geography

Where in the world do Eng-Tips members come from?
neoleachster (Automotive)
30 Apr 12 5:22
Hi,

I've written a form application in VB 2010 that defines a variable, and then runs a console application. I need to pass that single variable (which is a string) from the form application to a console application, (which is a separate program, not a console within the same project). I need then to use that variable in the console app to carry out further operations.

If anyone could help me out I would much appreciate it.

Thanks
neoleachster (Automotive)
30 Apr 12 7:05
I've solved this problem now.

For anyone who wants to know, use the following in app 1:

dim newprocess as new process()
newprocess.startinfo.filename = "Filelocation"
newprocess.startinfo.arguments = "variable"
newprocess.start()

then in the second application, use:

dim argumentsplit() as string

dim variable as string

for each argument as string in My.Application.CommandLineArgs

    argumentsplit = argument.split("symbol")

    variable = argumentsplit(0)

next

cheers



 

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close