程序代码: |
Private Sub FrmMain_Load(sender As Object, e As System.EventArgs) Handles Me.Load
For Each s As String In System.Environment.GetCommandLineArgs
Select Case s.ToLower
Case "-m"
'手动和配置...
Me.WindowState = FormWindowState.Maximized
Case "-r"
'自动读卡...
AutoReadCard()
End Select
Next
程序代码: |
//调用启动函数,参数间用空格即
Process.Start("程序名","a b c d e")
//接收程序的main函数
Static void Main(String[] args)
{
//传进自变String[] 类型
// args[0] == "a";
// args == "b";
}