-----------------------------------------------------------------------
 Copyright  1997 Microsoft Corporation. All rights reserved.
You have a royalty-free right to use, modify, reproduce and distribute
the Sample Application Files (and/or any modified version) in any way
    you find useful, if you agree that Microsoft has no warranty,
 obligations or liability for any Sample Application Files.
-----------------------------------------------------------------------

              Microsoft Visual Basic Console Window Sample
                              July 14, 1997

Introduction:
=============
This sample demonstrates attaching a console window to your Visual 
Basic application, writing to it, and running another application in 
the console window.

NOTE - Please read
=====================================================
If a Visual Basic application is started from a command prompt, 
the operating system automatically detaches it from the console, 
preventing the Visual Basic application from interacting with it. This 
sample does not provide a method to prevent this from happening, but 
does demonstrate how to create a new console window that your 
application can interact with. It also demonstrates running a console 
application (a batch file, in this case) from Visual Basic, which 
utilizes the created console.

Demonstration Steps
===================
1. Load Console.vbp.
2. This project contains a form (Console.frm), a class (Console.cls) 
	and a module (Console.bas).
3. Run the application. A form will appear.
4. Click on the "Open Console" button. A blank console window will 
	appear.
5. Click on the "Shell Console.bat" button. A listing of your Windows 
	directory will appear.
6. Click on the "Send Text" button.  The text in the textbox to the 
	right of the button will appear in the console.

5. Close the form. The console window will terminate.

Notes:
1. If you run another application in the console, it will run
asynchronously with your Visual Basic application. Output from the two
applications can become interspersed.

2. If the console application hasn't terminated prior to your Visual 
Basic application closing, the console window will remain open.

3. If you close the console window, the Visual Basic EXE will 
terminate.  If you are in the Visual Basic development environment 
(IDE), closing the console window will terminate the IDE.
    