Passing info from one program to another *Tutorial*
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
6 posts
Page 1 of 1
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-
You can also use
Code: Select all
Dim ProcessProperties As New ProcessStartInfo
ProcessProperties.FileName = "Updater.exe"
ProcessProperties.Arguments = "Your 'Command'"
ProcessProperties.WindowStyle = ProcessWindowStyle.Maximized
Dim myProcess As Process = Process.Start(ProcessProperties)
Code: Select all
MsgBox(Command.ToString)
Nice tutorial
, it can be used for Notepad? i process.start(Notepad.exe) and paste some text on it xD? can it work? code ? XD!
Thanks

Thanks
it can be used for Notepad?Notepad uses the first argument as the file name, though you can't set the text with this.
You can use SendMessage and WM_SETTEXT to set the text. This might be useful: viewtopic.php?f=21&t=5727&p=43511#p43452
Thanks mandai, i really like you and you are best helpful member here:)
i need 1 help if u wanan see my latest topic, its in New Topics in homepage on cns
i need 1 help if u wanan see my latest topic, its in New Topics in homepage on cns
6 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023