所有专家都很容易提问 [英] Easy question for all expert

查看:48
本文介绍了所有专家都很容易提问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个已编译的vb.net应用程序,我想让用户选择从start line命令启动

它并传递参数与否。我怎么能在我的代码中执行
?有可能吗?


Ex。 :MyApp.exe" Go"

I have a compiled vb.net app and I want to give the user a choice to launch
it from the start line command and pass it a parameter or not. How can I do
that in my code? Is it possible?

Ex. : MyApp.exe "Go"

推荐答案

checkout system.environment.commandline我想。


我目前不在IDE中。


然后只需查看该数组或集合中的命令行args以及

相应的行为。


HTH,


Shane

" Ghislain Tanguay" < GH **************************** @ hotmail.com>写在

消息新闻:ej ************** @ TK2MSFTNGP12.phx.gbl ...
checkout system.environment.commandline I think.

I am not in the IDE at present.

Then just look through the commandline args in that array or collection and
act accordingly.

HTH,

Shane
"Ghislain Tanguay" <gh****************************@hotmail.com> wrote in
message news:ej**************@TK2MSFTNGP12.phx.gbl...
我有一个已编译的vb .net app和我想让用户选择
从start line命令启动它并传给它一个参数。我怎么能在我的代码中做
呢?有可能吗?

Ex。 :MyApp.exe" Go"
I have a compiled vb.net app and I want to give the user a choice to launch it from the start line command and pass it a parameter or not. How can I do that in my code? Is it possible?

Ex. : MyApp.exe "Go"



*" Ghislain Tanguay" < GH **************************** @ hotmail.com> scripsit:
* "Ghislain Tanguay" <gh****************************@hotmail.com> scripsit:
我有一个已编译的vb.net应用程序,我想让用户选择从起始行命令启动它并将参数传递给它。我怎么能在我的代码中呢?有可能吗?
I have a compiled vb.net app and I want to give the user a choice to launch
it from the start line command and pass it a parameter or not. How can I do
that in my code? Is it possible?




\\\

公共模块计划

Public Sub Main(ByVal Args()As String)

...

End Sub

结束模块

///


在项目属性中选择''Sub Main''作为启动对象。


-

MS Herfried K .Wagner

MVP< URL:http://dotnet.mvps.org/>

VB< URL:http://dotnet.mvps.org/ dotnet / faqs />



\\\
Public Module Program
Public Sub Main(ByVal Args() As String)
...
End Sub
End Module
///

Select ''Sub Main'' as startup object in the project properties.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


Shane,


你没看到这个问题只针对Herfried。


Cor
Shane,

Did you not see that this question is only for Herfried.

Cor


这篇关于所有专家都很容易提问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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