这是微软的示例,TKS.
''' <summary>
''' 获取主程序运行的参数值
''' </summary>
''' <remarks></remarks>
Private Sub ParseCommandLineArgs()
Dim inputArgument As String = "/"
Dim inputName As String = ""
For Each s As String In My.Application.CommandLineArgs
If s.ToLower.StartsWith(inputArgument) Then
inputName = s.Remove(0, inputArgument.Length)
End If
Next
If inputName = "" Then
MsgBox("没有参数")
Else
MsgBox("参数名: " & inputName)
End If
End Sub