How to: Access Command-Line Arguments (Visual Basic)

The following code example loops over the application's command-line arguments.

Example

For Each argument As String In My.Application.CommandLineArgs
    ' Add code here to use the argument. 
Next

See Also

Tasks

How to: Enable a Batch Mode for Window Forms Applications

Reference

My.Application.CommandLineArgs Property

Structure of a Visual Basic Program