Wiki Home

Reckoning The Command Line


Namespace: WIN_COM_API

In Visual Basic, you can read the command line with the command function.

Example:
Dim lcCommandLine As String
lcCommandLine = Command        'Command is a function that returns the command line

This returns the entire string of values, even if there is none, that follow the name of your program. Your program must then figure out what the user typed and act accordingly. Use RTrim, LTrim, Right, Left, and Mid to extract the individual parameters your program needs.
Category Learning VB
( Topic last updated: 1999.12.11 04:45:32 PM )