exe 接受运行时参数 [英] exe with accepting runtime parameter

查看:22
本文介绍了exe 接受运行时参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何编写可以在运行时排除参数的vb代码

how o write vb code which can except parameter at runtime

例如.我的 exe 是readfile.exe",如果我想给文件名 rom 命令行,要执行的命令将是

ex. My exe is "readfile.exe" and if i want to give file name rom command line the command to be executed will be

readfile.exe 文件名

readfile.exe filename

它应该接受文件名参数并执行操作

it should take the file name parameter and perform the action

推荐答案

看看 Command 函数,它应该给你所有传入的参数.

Look at the Command function, that should give you all the parameters that were passed in.

我在网上找不到它的 VB6 文档,但 MSDN 有 VBA 版本的文档,而且通常是相同的,所以我建议查看 这里了解更多信息.它甚至还有一个完整的示例这里.

I can't find the VB6 docs for it online, but MSDN have the docs for the VBA version, and that's usually the same so I'd suggest looking here for more info. And it even has a full sample here.

这篇关于exe 接受运行时参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆