|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
sending values to a VB.Net exeis it possible to send values to a VB.Net exe? For example can I run
an exe sending the value of 5 and having the application show a message box with a number 5? <javier.go***@gmail.com> schrieb:
> is it possible to send values to a VB.Net exe? For example can I run There are different ways to archive this: .NET Remoting, IPC mechanisms > an exe sending the value of 5 and having the application show a message > box with a number 5? such as named pipes etc., 'SendMessage' + 'WM_COPYDATA' (Win32), old DDE, .... -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> > is it possible to send values to a VB.Net exe? For example can I run If you just want to start an application and pass parameters, that is relatively > an exe sending the value of 5 and having the application show a > message box with a number 5? easy. You would just check the System.Environment.CommandLine values and act on them accordingly. If you want to send the value to an already running application, there are two main options for you here. Neither are the easiest to deal with. In the first option, your application creates a remoting channel which another application would use and send the message through the channel including the new value. You could also do this with a single instance application (easier in 2005) by using a combination of the above. You send the arguments through the commandline to start a "new" instance of the application. The new application checks to see if it is already running. If so, it passes the parameters through a channel to the running instance and then kills itself. The running instance can then act on the message appropriately. I have an article on Single Instance Winforms at http://devauthority.com/blogs/jwooley/archive/2005/07/28/318.aspx Jim Wooley
Books: (I'm converting vb release 4 to release 8) But will eventually move it to other PCs
Writing and reading from a template Excel file using ADO.Net - results not recalculated Red Semaphore. Ideas? simple OO question Generating Reports Using VB.net minimizing viewstate Managed DX - 'DrawText' ambiguous EVAL function Using a User's Control of VB.NET in a Form of VB6 New profiler tool for .NET professionals |
|||||||||||||||||||||||