我想在其它程序中用shell调用exe文件时,可以带参数运行....即传递参数到exe文件中..行吗?哪位做过了,马上给分???

解决方案 »

  1.   

    sub main()
      if Command<>"" then
        select case Command
        case 参数字串内容1
          内容1处理窗口.show
        case 参数字串内容2
          内容2处理窗口.show
        case .....
        
        end select
        
        exit sub
      end if  起始窗口.show
    end sub
      

  2.   

    如何获取多个参数呢,要两个或以上,要用split进行分吗???
      

  3.   

    定义自己的参数格式,在sub main里处理一下
    比如 strPara1~strPara2~strPara3
    然后在main()里split(command,"~")
      

  4.   

    1.exe文件如下Private Sub Command1_Click()
        MsgBox Command()
    End Sub
    2.exe文件如下Private Sub Command1_Click()
        dim arg as string
        arg="这里填写你要的参数"
        Shell app.path & "\1.exe " & arg
    End Sub'
    'command()就是运行时传递上来的参数
    '被调用的程序与参数要空格隔开
      

  5.   

    toury:
       DDE如何实时传参啊?
      

  6.   

    http://topic.csdn.net/t/20021230/12/1312583.html
    参考8楼的例子
      

  7.   

    用command可以直接用
    s=command
    command带的就是参数。