Environment.GetCommandLineArgs
http://msdn.microsoft.com/zh-cn/library/system.environment.getcommandlineargs(v=vs.100).ASPX
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 End Sub原文链接:/vb/258440.html