By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 1,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Easy question for all expert

P: n/a
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"
Nov 21 '05 #1
Share this Question
Share on Google+
13 Replies


P: n/a
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...
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"

Nov 21 '05 #2

P: n/a
* "Ghislain Tanguay" <gh****************************@hotmail.com> scripsit:
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 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/>
Nov 21 '05 #3

P: n/a
Shane,

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

Cor
Nov 21 '05 #4

P: n/a
hehe...
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:OH**************@TK2MSFTNGP09.phx.gbl...
Shane,

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

Cor

Nov 21 '05 #5

P: n/a
All I see is:

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"

Where does it say FOR HERFRIED?

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:OH**************@TK2MSFTNGP09.phx.gbl...
Shane,

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

Cor

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.732 / Virus Database: 486 - Release Date: 7/29/2004
Nov 21 '05 #6

P: n/a
No and I still don't, looking in my Outlook express.

His message said nothing about Herfried that I could see..

Sorry..

Shane
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:OH**************@TK2MSFTNGP09.phx.gbl...
Shane,

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

Cor

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.732 / Virus Database: 486 - Release Date: 7/29/2004
Nov 21 '05 #7

P: n/a
wow, that's an even better way.... like the old C programs.

Didn't know I could do that.

Shane

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OI*************@TK2MSFTNGP12.phx.gbl...
* "Ghislain Tanguay" <gh****************************@hotmail.com>

scripsit:
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 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/>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.732 / Virus Database: 486 - Release Date: 7/29/2004
Nov 21 '05 #8

P: n/a
Easy question for the "All Expert"

And than I can only think on Herfried, I saw CJ did the same.

Cor

Nov 21 '05 #9

P: n/a
Shane,

Mostly the questions are not for such a selective public, everybody may
answer of course.

Do not take it serious please?

Cor
Nov 21 '05 #10

P: n/a
* "Cor Ligthert" <no**********@planet.nl> scripsit:
Did you not see that this question is only for Herfried.


?!?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #11

P: n/a
Well, since it is bad english either way it is hard for someone to tell.

it says Easy question for all expert

could be interpreted as a foreigner trying to say All Experts

correct english would have been, "An easy question for the Great Expert"
or "Mr. Know-It-All" or something of that fashion.

as it didn't have "the" in front of the word "all" it was bad english to
start with.
Sorry for trying to help.

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:eb**************@TK2MSFTNGP15.phx.gbl...
Easy question for the "All Expert"

And than I can only think on Herfried, I saw CJ did the same.

Cor

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.732 / Virus Database: 486 - Release Date: 7/29/2004
Nov 21 '05 #12

P: n/a
Shane,

I hope you saw my extra message, there is nothing serious in my message, you
had given an answer and Herfried had.

I only become triggered when somebody ask for an expert.

This newsgroup is in my opinion for everybody and everybody is allowed to
answer questions or to set them

:-)

Cor
Nov 21 '05 #13

P: n/a
No problem.
I guess it is the language barrier maybe.

Shane

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:Oo**************@TK2MSFTNGP10.phx.gbl...
Shane,

I hope you saw my extra message, there is nothing serious in my message, you had given an answer and Herfried had.

I only become triggered when somebody ask for an expert.

This newsgroup is in my opinion for everybody and everybody is allowed to
answer questions or to set them

:-)

Cor

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.745 / Virus Database: 497 - Release Date: 8/27/2004
Nov 21 '05 #14

This discussion thread is closed

Replies have been disabled for this discussion.