HELP!. Communication between DOS programs and VB programs 
Author Message
 HELP!. Communication between DOS programs and VB programs

Hello world,

        I am making a Windows application using Visual Basic. This application
call a DOS program using the SHELL statement. I would like know how can I get
the messages that DOS program produces from my Visual Basic application?

        Can anyone help me?

        Please, if you can give me any suggestion send your answer by e_mail:


        Thanks in advance for your help and Happy New year.



Thu, 18 Jun 1998 03:00:00 GMT  
 HELP!. Communication between DOS programs and VB programs

Dobber) threw this at us:

Quote:
>    I am making a Windows application using Visual Basic. This application
>call a DOS program using the SHELL statement. I would like know how can I get
>the messages that DOS program produces from my Visual Basic application?

Shelling it with the output redirected to a file might work.

x% = Shell("c:\command.com /c theapp.exe >result.txt")

Jens
--
* Everything I said are the opinions of someone else.   *
* I just cut-and-pasted.                                *

Jens Balchen jr.       http://www.sn.no/~balchen



Fri, 19 Jun 1998 03:00:00 GMT  
 HELP!. Communication between DOS programs and VB programs

Quote:

>Hello world,

>        I am making a Windows application using Visual Basic. This application
>call a DOS program using the SHELL statement. I would like know how can I get
>the messages that DOS program produces from my Visual Basic application?

Have the DOS program output to a file, eg. DIR *.* > c:\knownfn.txt.
If this doesn't work, you can sometimes redirect the output by using
a batch file.

If you can't get this to work, post a followup with which DOS program
you're running or more info about it's output.
--

Systems Analyst         WWW:    http://www.phoenix.net/~getj



Fri, 19 Jun 1998 03:00:00 GMT  
 HELP!. Communication between DOS programs and VB programs

Quote:

> Hello world,
>    I am making a Windows application using Visual Basic. This application
> call a DOS program using the SHELL statement. I would like know how can I get
> the messages that DOS program produces from my Visual Basic application?

I do it this (complex) way, but it works:

VB program shells PIF-file
PIF-file runs BAT-file :
  XXX.EXE > INFO.TXT
VB program reads INFO.TXT

Bye,
     Paul.



Mon, 22 Jun 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. About executing DOS programs in a VB program...

2. Execute DOS program from VB program

3. Execute DOS program from VB program

4. connecting dos program to vb program

5. How can I use a Dos program within a VB program

6. DOS Program Communications

7. HELP!! Communication problem between a DOS program and a VB program

8. HELP! Communication problem between a DOS program and A VB program

9. Help: Out of memory in a VB-DOS stats program

10. Help: How to call DOS program from VB Application

11. Problem closing DOS program from VB routine...HELP!

12. VB to VB program communications

 

 
Powered by phpBB® Forum Software