Passing info from one program to another *Tutorial*
Posted: Sun Sep 25, 2011 4:27 pm
Ok, so let's say you have a program, and from that program, you lauch another (using the Process.Start command). But there's one problem, you want the second program to use a string from the first one. Here's how:
1- In the first program, the one that will be sending the message, insert a button.
2- In the button's "Click" Event, insert this:
3- Add a label to the form, in the Form's "Load" event, put this:
-Comathi-
1- In the first program, the one that will be sending the message, insert a button.
2- In the button's "Click" Event, insert this:
Code: Select all
That's all for the first program, now for the second:Private sub Button1_Click (byval sender as object, byval e as system.eventargs) handles Button1.click
Process.Start("SecondProgram.exe","Message to send")
End Sub
3- Add a label to the form, in the Form's "Load" event, put this:
Code: Select all
That's all... Now, when you lauch the sender program and click on the button, the second program will launch and the label's text will be the sent message. I found this information on YouTube.
Hope this helps Private sub Form1_Load (byval sender as object, byval e as system.eventargs) handles me.load
Dim str as String=Command()
Label1.Text=str
Label1.Refresh()
End Sub

-Comathi-