The SHELL statement allows a program to use DOS commands.
Syntax: SHELL DosCommand$
- DOS commands can be a mixture of string and string variables added together.
- Allows access to DOS services such as DIR, VER, etc.
- Commands can also run Windows programs such as Notepad to read text files.
- NOTE: Unless QB is in a screen 0 window mode, your program will be minimized when Notepad opens.
Example: Shells to open Notepad minimized to print a file in Windows XP.
SHELL "CMD C/ START /Min Notepad /p " + FileName$ ' NT version
SHELL "START /min Notepad /p " + FileName$ ' Win 9x version