任何人都可以给我解决方案如何通过参数调用另一个应用程序。以及如何开始参数调用的过程。在VB代码的情况下:
通过param启动程序:
Sub main()
if command$ <> vbnullstring then ... running the process
end sub
通过param调用进程:
Dim shell As wshShell
Dim lngReturnCode As Long
Dim strShellCommand As String
Set shell = New wshShell
strShellCommand = "C:\Program Files\My Company\MyProg.exe " & _
"-Ffoption -Ggoption"
lngReturnCode = wshShell.Run(strShellCommand, vbNormalFocus, vbTrue)
我的英语不好,我需要QT的源代码。谢谢之前^^
答案 0 :(得分:1)
只需提供参数的QStringlist,请参阅http://doc.qt.nokia.com/4.7-snapshot/qprocess.html#details
QObject *parent;
...
QString program = "./path/to/Qt/examples/widgets/analogclock";
QStringList arguments;
arguments << "-style" << "motif";
QProcess *myProcess = new QProcess(parent);
myProcess->start(program, arguments);