Passing string between 2 applications VB
-
Hello guys, am new at coding. I was searching alot for an example an i cant find what i need. The most examples that i found, the first application executes the application 2 and passing the text. I need the Application 2 opened all the time, and i need the Application 1 send to Application 2 only the data. any help??
-
Hello guys, am new at coding. I was searching alot for an example an i cant find what i need. The most examples that i found, the first application executes the application 2 and passing the text. I need the Application 2 opened all the time, and i need the Application 1 send to Application 2 only the data. any help??
-
Hello guys, am new at coding. I was searching alot for an example an i cant find what i need. The most examples that i found, the first application executes the application 2 and passing the text. I need the Application 2 opened all the time, and i need the Application 1 send to Application 2 only the data. any help??
Member 12697037 wrote:
Hello guys, am new at coding.
Are you new at reading as well?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
Hello guys, am new at coding. I was searching alot for an example an i cant find what i need. The most examples that i found, the first application executes the application 2 and passing the text. I need the Application 2 opened all the time, and i need the Application 1 send to Application 2 only the data. any help??
-
Hello guys, am new at coding. I was searching alot for an example an i cant find what i need. The most examples that i found, the first application executes the application 2 and passing the text. I need the Application 2 opened all the time, and i need the Application 1 send to Application 2 only the data. any help??
I would probably suggest saving the string in a temporary file and then have App2 to read the string from that file and delete it. You could also take a look at this CP Article: Passing Data between Windows Forms
"If you feel the urge to add complexity, just go home early. You ain't gonna need it." - YAGNI
-
Member 12697037 wrote:
Hello guys, am new at coding.
Are you new at reading as well?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013Hey John, look what I just got[^] Gonna try it out this weekend.
If it's not broken, fix it until it is
-
I would probably suggest saving the string in a temporary file and then have App2 to read the string from that file and delete it. You could also take a look at this CP Article: Passing Data between Windows Forms
"If you feel the urge to add complexity, just go home early. You ain't gonna need it." - YAGNI
No, no - get App1 to create a new SQL DB table (with the timestamp as the table name) and enter it's string. App2 can access the DB and read the value before deleting the table. Much more multi user friendly and you could put it in the cloud and claim it as an IoT device! :-D
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
No, no - get App1 to create a new SQL DB table (with the timestamp as the table name) and enter it's string. App2 can access the DB and read the value before deleting the table. Much more multi user friendly and you could put it in the cloud and claim it as an IoT device! :-D
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
Hey John, look what I just got[^] Gonna try it out this weekend.
If it's not broken, fix it until it is
I have an Aimpoint Pro - the bushnell should work pretty good. I went out shooting this weekend. Spent 300 rounds. One guy wanted to buy my rifle because he liked the camo paint job. Offered me $1500 - I passed on the offer.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
I would probably suggest saving the string in a temporary file and then have App2 to read the string from that file and delete it. You could also take a look at this CP Article: Passing Data between Windows Forms
"If you feel the urge to add complexity, just go home early. You ain't gonna need it." - YAGNI
He could also write a Windows service that uses WCF to receive the string, encrypt it, send it to a web site which would store it in a database, and then have his other app periodically poll the web site with a WebClient object that would cause the web site to check the database for new data. Once the data is retrieved, he would then have to call another page on the web site to delete the data that was just retrieved. Then there's all the transaction processing that needs to occur, not to mention the necessity for code that makes sure the string is different from the last time he retrieved it, as well as maintaining a cache of retrieved strings to ensure no duplication has occurred. If he wants it to be configurable, he 'd have a lot more work to do as well. We haven't even GOTTEN to the act of logging everything in the system log yet.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
Hello guys, am new at coding. I was searching alot for an example an i cant find what i need. The most examples that i found, the first application executes the application 2 and passing the text. I need the Application 2 opened all the time, and i need the Application 1 send to Application 2 only the data. any help??
Buy an envelope and stamp. Put the string in the envelope and the stamp on it. Address it to the second app. Post it. Eventually it will arrive.
-
Buy an envelope and stamp. Put the string in the envelope and the stamp on it. Address it to the second app. Post it. Eventually it will arrive.
I would also suggest placing the envelope in a transporter from StarTrek so that the message can be properly digitized and encoded for transmission to the second app.
if (Object.DividedByZero == true) { Universe.Implode(); } Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
-
Hello guys, am new at coding. I was searching alot for an example an i cant find what i need. The most examples that i found, the first application executes the application 2 and passing the text. I need the Application 2 opened all the time, and i need the Application 1 send to Application 2 only the data. any help??
App1 can encode the string as a series of sounds that are emitted by the pc speaker (preferably using frequencies not human detectable). Then App2 listens for these frequencies using the microphone and decodes those sounds back into the string. Then get a job with the NSA.
#SupportHeForShe Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
-
Hey John, look what I just got[^] Gonna try it out this weekend.
If it's not broken, fix it until it is
You freak! Don't you know that guns and gunsights kill our children????? How dare you use guns to entertain yourself!! You must be a blood-loving gun freak! ;P Just kidding...
#SupportHeForShe Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
-
Hello guys, am new at coding. I was searching alot for an example an i cant find what i need. The most examples that i found, the first application executes the application 2 and passing the text. I need the Application 2 opened all the time, and i need the Application 1 send to Application 2 only the data. any help??
Don't listen to these replies, they don't know what they're talking about. If you want two apps to talk to each other, first you gotta take them out to a pub. Apps are usually shy at first, so of course you'll need to buy them a few beers*. Once they're good well and intoxicated, you should tell the first app that the second app thinks its cute. Then tell the second app the first app thinks its cute. Then you can leave, for your work is done, and the transport protocol TCP/WEEPEE version 2.0 will do the rest. * Should like like this: :beer:
Jeremy Falcon
-
He could also write a Windows service that uses WCF to receive the string, encrypt it, send it to a web site which would store it in a database, and then have his other app periodically poll the web site with a WebClient object that would cause the web site to check the database for new data. Once the data is retrieved, he would then have to call another page on the web site to delete the data that was just retrieved. Then there's all the transaction processing that needs to occur, not to mention the necessity for code that makes sure the string is different from the last time he retrieved it, as well as maintaining a cache of retrieved strings to ensure no duplication has occurred. If he wants it to be configurable, he 'd have a lot more work to do as well. We haven't even GOTTEN to the act of logging everything in the system log yet.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013No Message Queue involved? Sounds like a half baked solution. :^)
-
Hello guys, am new at coding. I was searching alot for an example an i cant find what i need. The most examples that i found, the first application executes the application 2 and passing the text. I need the Application 2 opened all the time, and i need the Application 1 send to Application 2 only the data. any help??
First of all, welcome to Code Project. As you have probably gathered by now from our more robust members, the lounge isn't really the place to ask programming questions; generally you would want to ask a question in a more appropriate forum such as this[^] one. I have to assume that you don't really need Application 2 open all the time; rather, you have a requirement that Application 1 isn't going to open it with the relevant data. If we accept that as true then this simplifies the problem you have to solve. Basically, what you are looking for is something called Client/Server programming, where you communicate between two separate processes using techniques such as named pipes, sockets, messaging over TCP, and so on. The problem with this type of development is that this really is a complex area - you could use something like Anonymous Pipes[^]; there's a working example in VB.NET there so that should help. Alternatively, you should search Google for examples of Client/Server programming in VB.NET[^]. I hope that this helps to give you some areas to explore.
This space for rent
-
Don't listen to these replies, they don't know what they're talking about. If you want two apps to talk to each other, first you gotta take them out to a pub. Apps are usually shy at first, so of course you'll need to buy them a few beers*. Once they're good well and intoxicated, you should tell the first app that the second app thinks its cute. Then tell the second app the first app thinks its cute. Then you can leave, for your work is done, and the transport protocol TCP/WEEPEE version 2.0 will do the rest. * Should like like this: :beer:
Jeremy Falcon
I think this would work well until the two apps become overly coupled and start spawning too many child processes which become starved for resources.
if (Object.DividedByZero == true) { Universe.Implode(); } Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
-
I have an Aimpoint Pro - the bushnell should work pretty good. I went out shooting this weekend. Spent 300 rounds. One guy wanted to buy my rifle because he liked the camo paint job. Offered me $1500 - I passed on the offer.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013John Simmons / outlaw programmer wrote:
because he liked the camo paint job
Camo couch extra? ;) Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
-
I think this would work well until the two apps become overly coupled and start spawning too many child processes which become starved for resources.
if (Object.DividedByZero == true) { Universe.Implode(); } Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
In which case application B could limit application A's disk access to limit the exposure of copies being created being serialized.
Jeremy Falcon