VB6.0如何制作一个可以带参数运行的程序
如何使用VB6.0制作一个可以在普通WINDOWS系统下带参数运行的程序?比如:编译好的EXE文件为C.exe,不带参数,直接运行,就显示主窗体,并加载一张图片,如果带参数“/PWD”运行,那就显示主窗体,并同时在主窗体上显示密码输入框和确定按钮。
Option Explicit Private Sub Form_Activate() Dim strCommandLine() As String If Command <> "" Then strCommandLine() = Split(Command, " ") If UBound(strCommandLine) = 0 And UCase(strCommandLine(0)) = "/PWD" Then Text1.Visible = True Text2.Visible = True End If Else Picture1.Visible = True Picture1.Picture = LoadPicture("C:\AAA.bmp") End If End Sub Private Sub Form_Load() Picture1.Visible = False Text1.Visible = False Text2.Visible = False End Sub