About VB how to write EXE program with execution parameters, can be completed by VB with "command ()" commands. Here are CSDN instructions:
Command function
Returns the parameters section of the command line, which is used to mount an executable program developed by Microsoft Visual Basic or Visual Basic.
Grammar
Command
Description
When you load Visual Basic from the command line , /cmd
any part of the subsequent command line is passed to the program as a command-line parameter. In the following example, cmdlineargs
The parameter information returned by the Command function is represented.
VB /cmd cmdlineargs
For applications developed and compiled with Visual Basic as an. exe file,command returns any parameters that appear after the application name in the command line. For example:
MyApp cmdlineargs
下面是我做的一个简单的实例:
1.新建一个VB工程 工程2;
在窗体上添加一个commandbutton 按钮,代码如下
Private Sub Command1_Click()
Shell App.Path & "/工程2.exe safsdf", 1
End Sub
然后保存在某一目录下
2. 在新建一个vb工程 工程2.
代码如下
Private Sub Form_Load ()
Dim CmdLine
CmdLine = Command ()
Me.caption = CmdLine
End Sub
Compile and build the project 2.exe, Project 2.exe Save directory for the front new project catalog.
Then open Project 1, run. The Shell's parameters are displayed in the title bar of Project 2.
How VB writes EXE programs with execution parameters