Simple Program In Vb6.0

Posted on by admin
  1. Simple Program In Vb6.0

I want to run a batch program(.bat) through a Visual Basic 6.0 application and also want to print the output of the batch program(.bat) in the Visual Basic 6.0 application. I want to execute the dir command in the batch file so that VB6.0 application can print the output in a text box.

VB6.0 code:

first.bat:

In the above example 'first.bat' is batch file and containing the 'dir c:' command. Now VB6.0 app will run the first.bat and show the output of the 'dir c:' command in a text box.

Object Oriented Programming Lab Visual Basic Projects with source Code Download Visual Basic Projects with source Code, reports and abstracts.You can use these projects by modifying according to your need of functionality.Visual basic projects basically use oracle database for project implementation.

Simple Program In Vb6.0

Please also tell me that I can achieve this requirement means can VB6.0 application regain the control from batch program(.bat)?

Please help me with this.

Amit Raj
Amit RajAmit Raj

3 Answers

Your example is not a batch file, but if all you want to do is display the results of a command prompt's dir c: command in a textbox, then the following should work:

Disclaimer: The following is 'Air Code' and not tested for syntax

There are several variations and alternative ways to accomplish this, this is just a quick-and-dirty solution example.

Bill HilemanBill Hileman

Lots of simple ways to skin this cat, for example:

Simple Program In Vb6.0
Bob77Bob77

Following is solution which worked for me:

I got this solution from the following link:Solution Link

Amit RajAmit Raj

Simple Program In Vb6.0

Not the answer you're looking for? Browse other questions tagged batch-filevb6 or ask your own question.