VB Parameters executable app

Vb可执行程序可带参数在命令行运行,例如:


vb写的一个Form:

Private Sub Form_Load()
Label1.Caption = Command()
If Left(Command, 2) = "p" Then
    Form1.BackColor = RGB(&H8A, &H2B, &HE2)
ElseIf Left(Command, 2) = "pa" Then
    Form1.BackColor = RGB(&HFF, &HA5, &HA)
End If
End Sub

测试:

run --  cmd -- xxx.exe parame

-----------------------------

结果:

Label1.Caption = parame

Form1.BackColor = RGB(&HFF, &HA5, &HA)

你可能感兴趣的:(parameter,exe,vb,executable)