VB exe via a batch file
VB exe via a batch file
(OP)
Is there a way to pass a parameter to a vb exe from a shell command / batch file and have the return value show up on the next line of the same command prompt screen that launched the VB exe....
for example, VB code is:
varResult = var1 + var2
When the exe is launched via shell command, the next line should
ask the use tio input a value for var1 followed by asking the user to input value for var2
Displaying the result in the shell window.
Thanks
for example, VB code is:
varResult = var1 + var2
When the exe is launched via shell command, the next line should
ask the use tio input a value for var1 followed by asking the user to input value for var2
Displaying the result in the shell window.
Thanks
RE: VB exe via a batch file
I haven't done this, but you might be able to use the Win32 file functions to write to the stdio file (a reserved file handle). Look in the MSDN for samples on doing this.
Chip H.
RE: VB exe via a batch file
RE: VB exe via a batch file
Use a small data file to store a value say "var1" in your case.
Then the first program can read that data file in a timer event every second or so.
So both programs are reading the same data file or writing to it. But each program has to open it read something then close it or the other program will get a error.
you can pass values to any number of programs using this method.
If the data is complicated lots of values use an Access .MDB which is better suited for this.
Hope this helps
DougP